Skip to content
Commit cab9fae4 authored by Eric Christopher's avatar Eric Christopher
Browse files

Add global static variables for anonymous union fields. This makes

sure that a debugger can find them when stepping through code,
for example from the included testcase:

   12     int test_it() {
   13       c = 1;
   14       d = 2;
-> 15       a = 4;
   16       return (c == 1);
   17     }
   18
(lldb) p a
(int) $0 = 2
(lldb) p c
(int) $1 = 2
(lldb) p d
(int) $2 = 2

and a, c, d are all part of the file static anonymous union:

static union {
  int c;
  int d;
  union {
    int a;
  };
  struct {
    int b;
  };
};

Fixes PR19221.

llvm-svn: 205952
parent 951716bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment