summaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/arc-linetable.m
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-02-04 19:47:54 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-02-04 19:47:54 +0000
commitc2d8f6b982132ebf20345f85c415a49b843b67d8 (patch)
tree7beb405e6de179ce27069e343b723363b3ef9754 /test/CodeGenObjC/arc-linetable.m
parentcd61356464db503332e6c529a4f157894431b006 (diff)
downloadclang-c2d8f6b982132ebf20345f85c415a49b843b67d8.tar.gz
DebugInfo: Attribute cleanup code to the end of the scope, not the end of the function.
Now if you break on a dtor and go 'up' in your debugger (or you get an asan failure in a dtor) during an exception unwind, you'll have more context. Instead of all dtors appearing to be called from the '}' of the function, they'll be attributed to the end of the scope of the variable, the same as the non-exceptional dtor call. This doesn't /quite/ remove all uses of CurEHLocation (which might be nice to remove, for a few reasons) - it's still used to choose the location for some other work in the landing pad. It'd be nice to attribute that code to the same location as the exception calls within the block and to remove CurEHLocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228181 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjC/arc-linetable.m')
-rw-r--r--test/CodeGenObjC/arc-linetable.m12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/CodeGenObjC/arc-linetable.m b/test/CodeGenObjC/arc-linetable.m
index 656c343468..cd746d18c1 100644
--- a/test/CodeGenObjC/arc-linetable.m
+++ b/test/CodeGenObjC/arc-linetable.m
@@ -4,8 +4,8 @@
// CHECK: define {{.*}}testNoSideEffect
// CHECK: call void @objc_storeStrong{{.*}}
-// CHECK: call void @objc_storeStrong{{.*}} !dbg ![[ARC1:[0-9]+]]
-// CHECK: ret {{.*}} !dbg ![[RET1:[0-9]+]]
+// CHECK: call void @objc_storeStrong{{.*}} !dbg ![[RET1:[0-9]+]]
+// CHECK: ret {{.*}} !dbg ![[RET1]]
// CHECK: define {{.*}}testNoCleanup
// CHECK: ret {{.*}} !dbg ![[RET2:[0-9]+]]
@@ -21,8 +21,8 @@
// CHECK: define {{.*}}testVoid
// CHECK: call void @objc_storeStrong{{.*}}
-// CHECK: call void @objc_storeStrong{{.*}} !dbg ![[ARC5:[0-9]+]]
-// CHECK: ret {{.*}} !dbg ![[RET5:[0-9]+]]
+// CHECK: call void @objc_storeStrong{{.*}} !dbg ![[RET5:[0-9]+]]
+// CHECK: ret {{.*}} !dbg ![[RET5]]
// CHECK: define {{.*}}testVoidNoReturn
// CHECK: @objc_msgSend{{.*}} !dbg ![[MSG6:[0-9]+]]
@@ -57,9 +57,8 @@ typedef signed char BOOL;
// CHECK: ![[TESTNOSIDEEFFECT:.*]] = {{.*}}[ DW_TAG_subprogram ] [line [[@LINE+1]]] [local] [def] [-[AppDelegate testNoSideEffect:]]
- (int)testNoSideEffect:(NSString *)foo {
int x = 1;
- // CHECK: ![[ARC1]] = !MDLocation(line: [[@LINE+1]], scope: ![[TESTNOSIDEEFFECT]])
return 1; // Return expression
- // CHECK: ![[RET1]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+ // CHECK: ![[RET1]] = !MDLocation(line: [[@LINE+1]], scope: ![[TESTNOSIDEEFFECT]])
} // Cleanup + Ret
- (int)testNoCleanup {
@@ -82,7 +81,6 @@ typedef signed char BOOL;
}
- (void)testVoid:(NSString *)foo {
- // CHECK: ![[ARC5]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
return;
// CHECK: ![[RET5]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
}