diff options
author | Devang Patel <dpatel@apple.com> | 2010-06-28 18:25:03 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-06-28 18:25:03 +0000 |
commit | 4a1cad673c5bf0812099c6c8f551fe6af967c2b3 (patch) | |
tree | 410d267eac0a5f7a528f52c769fffad1895c608d /test/FrontendC | |
parent | 3d895b974d01f2c562a869921274f1198e29ff87 (diff) | |
download | external_llvm-4a1cad673c5bf0812099c6c8f551fe6af967c2b3.zip external_llvm-4a1cad673c5bf0812099c6c8f551fe6af967c2b3.tar.gz external_llvm-4a1cad673c5bf0812099c6c8f551fe6af967c2b3.tar.bz2 |
Preserve deleted function's local variables' debug info.
Radar 8122864.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107027 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FrontendC')
-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..e5df8856 --- /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; +} |