diff options
author | Devang Patel <dpatel@apple.com> | 2010-04-13 00:08:43 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-04-13 00:08:43 +0000 |
commit | cd9199eb3dd1a665ea642f3918020a53e5ecb673 (patch) | |
tree | f25c2f70f1e5eb7c575650199c5242fc0e7c4df3 /test/CodeGenCXX/destructor-debug-info.cpp | |
parent | df721408f54f87a790fb986dfd64984472a1f892 (diff) |
Fix debug info for cleanup block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101100 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/destructor-debug-info.cpp')
-rw-r--r-- | test/CodeGenCXX/destructor-debug-info.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGenCXX/destructor-debug-info.cpp b/test/CodeGenCXX/destructor-debug-info.cpp new file mode 100644 index 0000000000..9e32275d33 --- /dev/null +++ b/test/CodeGenCXX/destructor-debug-info.cpp @@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -g -S -emit-llvm -o %t %s +// RUN: grep "i32 20, i32 3, metadata" %t | count 1 +// Check there is a line number entry for line 20 where b1 is destructed. +class A { int a; }; +class B { +public: + B() { a = new A; } + ~B() { delete a; } +private: + A *a; +}; + +void fn(B b); + +int i; +void foo() { + if (i) { + B b1; + fn (b1); + } +} |