diff options
author | Adrian Prantl <aprantl@apple.com> | 2013-06-18 00:27:36 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2013-06-18 00:27:36 +0000 |
commit | de5fde0b05a89e865ff0fb365f15e04b1eb52b8a (patch) | |
tree | a24fc5734219b32bfac922dfd50fd3a29c8cb214 /clang/test/CodeGen/debug-info-block-decl.c | |
parent | a62e38c89840f9dbe448b1a0dc66bdc274ab1506 (diff) | |
download | bcm5719-llvm-de5fde0b05a89e865ff0fb365f15e04b1eb52b8a.tar.gz bcm5719-llvm-de5fde0b05a89e865ff0fb365f15e04b1eb52b8a.zip |
Remove an ugly hack that was meant to eliminate the breakpoint ambiguity
between a block assignment and the entry of the block function. In reality
this wouldn't work anyway because blocks are predominantly created
on-the-fly inside of an ObjC method invocation.
The proper fix for the ambiguity is to use -gcolumn-info to differentiate
the breakpoints.
This is expected to break some block-related darwin-gdb tests.
rdar://problem/14039866
llvm-svn: 184157
Diffstat (limited to 'clang/test/CodeGen/debug-info-block-decl.c')
-rw-r--r-- | clang/test/CodeGen/debug-info-block-decl.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/CodeGen/debug-info-block-decl.c b/clang/test/CodeGen/debug-info-block-decl.c new file mode 100644 index 00000000000..06c0e1ad319 --- /dev/null +++ b/clang/test/CodeGen/debug-info-block-decl.c @@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -fblocks -emit-llvm -o - %s | FileCheck %s +// Assignment and block entry should point to the same line. +// rdar://problem/14039866 + +// CHECK: define{{.*}}@main() +// CHECK: store{{.*}}bitcast{{.*}}, !dbg ![[ASSIGNMENT:[0-9]+]] +// CHECK: define {{.*}} @__main_block_invoke +// CHECK: dbg ![[BLOCK_ENTRY:[0-9]+]] + +int main() +{ +// CHECK: [[ASSIGNMENT]] = metadata !{i32 [[@LINE+2]], +// CHECK: [[BLOCK_ENTRY]] = metadata !{i32 [[@LINE+1]], + int (^blockptr)(void) = ^(void) { + return 0; + }; + return blockptr(); +} + |