[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 2 13:34:16 PDT 2020
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; }();
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88754.295903.patch
Type: text/x-patch
Size: 704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201002/2a9db4dc/attachment.bin>
More information about the cfe-commits
mailing list