[PATCH] D88754: [clang] Add a test for CGDebugInfo treatment of blocks
Scott Linder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 9 12:09:26 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG40cef5a00eb8: [clang] Add a test for CGDebugInfo treatment of blocks (authored by scott.linder).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88754/new/
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, {{[0-9]+}}, DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}){{.*}})
+ __block int i;
+// CHECK: call void @llvm.dbg.declare({{.*}}!DIExpression(DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}, DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}, DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}){{.*}})
+ ^ { i = 1; }();
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88754.297295.patch
Type: text/x-patch
Size: 746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201009/ef48a3ae/attachment.bin>
More information about the cfe-commits
mailing list