diff options
Diffstat (limited to 'test/CodeGen/lifetime-debuginfo-1.c')
-rw-r--r-- | test/CodeGen/lifetime-debuginfo-1.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/lifetime-debuginfo-1.c b/test/CodeGen/lifetime-debuginfo-1.c new file mode 100644 index 0000000..674346a --- /dev/null +++ b/test/CodeGen/lifetime-debuginfo-1.c @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -gline-tables-only %s -o - | FileCheck %s + +// Inserting lifetime markers should not affect debuginfo + +extern int x; + +// CHECK-LABEL: define i32 @f +int f() { + int *p = &x; +// CHECK: ret i32 %{{.*}}, !dbg [[DI:![0-9]*]] +// CHECK: [[DI]] = !DILocation(line: [[@LINE+1]] + return *p; +} |