scott.linder created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. scott.linder requested review of this revision.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D88754 Files: clang/test/CodeGen/debug-info-block-expr.c Index: clang/test/CodeGen/debug-info-block-expr.c =================================================================== --- /dev/null +++ clang/test/CodeGen/debug-info-block-expr.c @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fblocks -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s +// Verify that the desired DIExpression are generated for blocks. + +void test() { +// CHECK: call void @llvm.dbg.declare({{.*}}!DIExpression(DW_OP_plus_uconst, 8, DW_OP_deref, DW_OP_plus_uconst, 24){{.*}}) + __block int i; +// CHECK: call void @llvm.dbg.declare({{.*}}!DIExpression(DW_OP_deref, DW_OP_plus_uconst, 32, DW_OP_deref, DW_OP_plus_uconst, 8, DW_OP_deref, DW_OP_plus_uconst, 24){{.*}}) + ^ { i = 1; }(); +}
Index: clang/test/CodeGen/debug-info-block-expr.c =================================================================== --- /dev/null +++ clang/test/CodeGen/debug-info-block-expr.c @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fblocks -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s +// Verify that the desired DIExpression are generated for blocks. + +void test() { +// CHECK: call void @llvm.dbg.declare({{.*}}!DIExpression(DW_OP_plus_uconst, 8, DW_OP_deref, DW_OP_plus_uconst, 24){{.*}}) + __block int i; +// CHECK: call void @llvm.dbg.declare({{.*}}!DIExpression(DW_OP_deref, DW_OP_plus_uconst, 32, DW_OP_deref, DW_OP_plus_uconst, 8, DW_OP_deref, DW_OP_plus_uconst, 24){{.*}}) + ^ { i = 1; }(); +}
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits