diff options
Diffstat (limited to 'test/FrontendC/2010-06-28-DbgLocalVar.c')
-rw-r--r-- | test/FrontendC/2010-06-28-DbgLocalVar.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/FrontendC/2010-06-28-DbgLocalVar.c b/test/FrontendC/2010-06-28-DbgLocalVar.c new file mode 100644 index 0000000..e5df885 --- /dev/null +++ b/test/FrontendC/2010-06-28-DbgLocalVar.c @@ -0,0 +1,14 @@ +// RUN: %llvmgcc -S -O2 -g %s -o - | llc -O2 -o %t.s +// RUN: grep DW_TAG_structure_type %t.s | count 2 +// Radar 8122864 + +// Code is not generated for function foo, but preserve type information of +// local variable xyz. +static foo() { + struct X { int a; int b; } xyz; +} + +int bar() { + foo(); + return 1; +} |