diff options
author | John McCall <rjmccall@apple.com> | 2013-05-03 07:33:41 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2013-05-03 07:33:41 +0000 |
commit | dec348f7dbf8207a30a2a7b978f6568e2a499cbd (patch) | |
tree | 3cd321d2f0ecf328ba36812a25554a7e0502baa7 /clang/test/CodeGenObjC/debug-info-blocks.m | |
parent | 320fbf057c7bcdfd45b90747a9acf93cde93ec38 (diff) | |
download | llvm-dec348f7dbf8207a30a2a7b978f6568e2a499cbd.zip llvm-dec348f7dbf8207a30a2a7b978f6568e2a499cbd.tar.gz llvm-dec348f7dbf8207a30a2a7b978f6568e2a499cbd.tar.bz2 |
Correctly emit certain implicit references to 'self' even within
a lambda.
Bug #1 is that CGF's CurFuncDecl was "stuck" at lambda invocation
functions. Fix that by generally improving getNonClosureContext
to look through lambdas and captured statements but only report
code contexts, which is generally what's wanted. Audit uses of
CurFuncDecl and getNonClosureAncestor for correctness.
Bug #2 is that lambdas weren't specially mapping 'self' when inside
an ObjC method. Fix that by removing the requirement for that
and using the normal EmitDeclRefLValue path in LoadObjCSelf.
rdar://13800041
llvm-svn: 181000
Diffstat (limited to 'clang/test/CodeGenObjC/debug-info-blocks.m')
-rw-r--r-- | clang/test/CodeGenObjC/debug-info-blocks.m | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/test/CodeGenObjC/debug-info-blocks.m b/clang/test/CodeGenObjC/debug-info-blocks.m index f50ddf0..3d91c9e 100644 --- a/clang/test/CodeGenObjC/debug-info-blocks.m +++ b/clang/test/CodeGenObjC/debug-info-blocks.m @@ -7,11 +7,10 @@ // CHECK: define {{.*}}_block_invoke // CHECK: %[[BLOCK:.*]] = bitcast i8* %.block_descriptor to <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>*, !dbg // CHECK-NEXT: store <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>* %[[BLOCK]], <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>** %[[ALLOCA:.*]], align -// CHECK-NEXT: getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>* %[[BLOCK]], i32 0, i32 5 // CHECK-NEXT: call void @llvm.dbg.declare(metadata !{<{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>** %[[ALLOCA]]}, metadata ![[SELF:[0-9]+]]) // CHECK-NEXT: call void @llvm.dbg.declare(metadata !{%1** %d}, metadata ![[D:[0-9]+]]) -// CHECK: ![[SELF]] = {{.*}} [ DW_TAG_auto_variable ] [self] [line 52] -// CHECK: ![[D]] = {{.*}} [d] [line 50] +// CHECK: ![[SELF]] = {{.*}} [ DW_TAG_auto_variable ] [self] [line 51] +// CHECK: ![[D]] = {{.*}} [d] [line 49] typedef unsigned int NSUInteger; |