r184157 - Remove an ugly hack that was meant to eliminate the breakpoint ambiguity

Eric Christopher echristo at gmail.com
Mon Jun 17 17:31:14 PDT 2013


On Mon, Jun 17, 2013 at 5:27 PM, Adrian Prantl <aprantl at apple.com> wrote:
> Author: adrian
> Date: Mon Jun 17 19:27:36 2013
> New Revision: 184157
>
> URL: http://llvm.org/viewvc/llvm-project?rev=184157&view=rev
> Log:
> 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.
>

Should probably either mark them as expected failures or use
-gcolumn-info on the 4.2 testsuite bots?

-eric

> rdar://problem/14039866
>
> Added:
>     cfe/trunk/test/CodeGen/debug-info-block-decl.c
> Modified:
>     cfe/trunk/lib/CodeGen/CGStmt.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=184157&r1=184156&r2=184157&view=diff
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGStmt.cpp Mon Jun 17 19:27:36 2013
> @@ -34,10 +34,7 @@ using namespace CodeGen;
>  void CodeGenFunction::EmitStopPoint(const Stmt *S) {
>    if (CGDebugInfo *DI = getDebugInfo()) {
>      SourceLocation Loc;
> -    if (isa<DeclStmt>(S))
> -      Loc = S->getLocEnd();
> -    else
> -      Loc = S->getLocStart();
> +    Loc = S->getLocStart();
>      DI->EmitLocation(Builder, Loc);
>
>      LastStopPoint = Loc;
>
> Added: cfe/trunk/test/CodeGen/debug-info-block-decl.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-block-decl.c?rev=184157&view=auto
> ==============================================================================
> --- cfe/trunk/test/CodeGen/debug-info-block-decl.c (added)
> +++ cfe/trunk/test/CodeGen/debug-info-block-decl.c Mon Jun 17 19:27:36 2013
> @@ -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();
> +}
> +
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list