[PATCH] D149272: [clang] Call printName to get name of Decl

Dan McGregor via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 26 18:53:25 PDT 2023


dankm updated this revision to Diff 517426.
dankm added a comment.

Add test case


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149272/new/

https://reviews.llvm.org/D149272

Files:
  clang/test/CodeGen/debug-prefix-map.cpp


Index: clang/test/CodeGen/debug-prefix-map.cpp
===================================================================
--- /dev/null
+++ clang/test/CodeGen/debug-prefix-map.cpp
@@ -0,0 +1,11 @@
+// RUN: %clang++ -g -fdebug-prefix-map=%p=./UNLIKELY_PATH/empty -S -c %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-REL
+
+struct alignas(64) an {
+  struct {
+    unsigned char x{0};
+  } arr[64];
+};
+
+struct an *pan = new an;
+
+// CHECK-REL: !DISubprogram(name: "(unnamed struct at ./UNLIKELY_PATH/empty{{/|\\\\}}{{.*}}",


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149272.517426.patch
Type: text/x-patch
Size: 527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230427/c7f33e13/attachment.bin>


More information about the cfe-commits mailing list