summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/debug-info-class.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-02-01 19:09:49 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-02-01 19:09:49 +0000
commit357aafb566cdaf5ac689d787f08db998545ce1e1 (patch)
tree4ab90c3ed7a6288290e8bda8738e2c1f36de88c6 /clang/test/CodeGenCXX/debug-info-class.cpp
parentd0ef72808ce5474add9ecbf8d7d6b5e7620b6d8e (diff)
downloadbcm5719-llvm-357aafb566cdaf5ac689d787f08db998545ce1e1.tar.gz
bcm5719-llvm-357aafb566cdaf5ac689d787f08db998545ce1e1.zip
Fix exception handling line table problems introduced by r173593
r173593 made us a little too eager to associate all code at the end of a function with the user-written 'return' line. This caused problems with breakpoints as they'd be set in exception handling code preceeding the actual non-exception return handling code, leading to the breakpoint never being hit in non-exceptional execution. This change restores the pre-r173593 exception handling line information where the cleanup code is associated with the '}' not the return line. llvm-svn: 174206
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-class.cpp')
-rw-r--r--clang/test/CodeGenCXX/debug-info-class.cpp32
1 files changed, 23 insertions, 9 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-class.cpp b/clang/test/CodeGenCXX/debug-info-class.cpp
index 131693b21a5..410b921ce45 100644
--- a/clang/test/CodeGenCXX/debug-info-class.cpp
+++ b/clang/test/CodeGenCXX/debug-info-class.cpp
@@ -1,21 +1,20 @@
// RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s
struct foo;
-void func(foo *f) { // CHECK: DW_TAG_structure_type
+void func(foo *f) {
}
class bar;
-void func(bar *f) { // CHECK: DW_TAG_class_type
+void func(bar *f) {
}
union baz;
-void func(baz *f) { // CHECK: DW_TAG_union_type
+void func(baz *f) {
}
-class B { // CHECK: DW_TAG_class_type
+class B {
public:
virtual ~B();
-// CHECK: metadata !"_vptr$B", {{.*}}, i32 64, metadata !{{.*}}} ; [ DW_TAG_member ]
};
-struct A { // CHECK: DW_TAG_structure_type
+struct A {
int one;
- static const int HdrSize = 52; // CHECK: HdrSize
+ static const int HdrSize = 52;
int two;
A() {
int x = 1;
@@ -23,7 +22,22 @@ struct A { // CHECK: DW_TAG_structure_type
};
-int main() {
- A a;
+int main(int argc, char **argv) {
B b;
+ if (argc) {
+ A a;
+ }
+ return 0;
}
+
+// CHECK: unwind label %terminate.lpad, !dbg ![[EXCEPTLOC:.*]]
+// CHECK: store i32 0, i32* %retval, !dbg ![[RETLOC:.*]]
+// CHECK: DW_TAG_structure_type ] [foo]
+// CHECK: DW_TAG_class_type ] [bar]
+// CHECK: DW_TAG_union_type ] [baz]
+// CHECK: DW_TAG_structure_type ] [A]
+// CHECK: HdrSize
+// CHECK: DW_TAG_class_type ] [B]
+// CHECK: metadata !"_vptr$B", {{.*}}, i32 64, metadata !{{.*}}} ; [ DW_TAG_member ]
+// CHECK: ![[EXCEPTLOC]] = metadata !{i32 31,
+// CHECK: ![[RETLOC]] = metadata !{i32 30,
OpenPOWER on IntegriCloud