================
@@ -0,0 +1,73 @@
+; RUN: llc -mtriple=x86_64-linux-gnu -filetype=obj %s -o %t.o
+; RUN: llvm-dwarfdump --debug-info %t.o | FileCheck %s
+;
+; Reduced from clang output for:
+; struct Test {
+; static inline constexpr char STR[] = "Hello";
+; static inline constexpr int NUMS[] = {1, 2, 3};
+; static inline constexpr unsigned char BYTES[] = {0xDE, 0xAD};
+; };
+; void use() { (void)Test::STR; (void)Test::NUMS; (void)Test::BYTES; }
+
+; CHECK: DW_TAG_structure_type
+; CHECK: DW_AT_name ("Test")
+;
+; CHECK: DW_TAG_member
+; CHECK: DW_AT_name ("STR")
+; CHECK: DW_AT_const_value (<0x06> 48 65 6c 6c 6f 00 )
+;
+; CHECK: DW_TAG_member
+; CHECK: DW_AT_name ("NUMS")
+; CHECK: DW_AT_const_value (<0x0c> 01 00 00 00 02 00 00 00 03 00 00 00 )
+;
+; CHECK: DW_TAG_member
+; CHECK: DW_AT_name ("BYTES")
+; CHECK: DW_AT_const_value (<0x02> de ad )
+
+@_ZN4Test3STRE = linkonce_odr constant [6 x i8] c"Hello\00", align 1, !dbg !0
+@_ZN4Test4NUMSE = linkonce_odr constant [3 x i32] [i32 1, i32 2, i32 3], align
4, !dbg !5
+@_ZN4Test5BYTESE = linkonce_odr constant [2 x i8] c"\DE\AD", align 1, !dbg !28
+
+define dso_local void @_Z3usev() !dbg !33 {
+ ret void, !dbg !36
+}
----------------
dzhidzhoev wrote:
Do we actually need this function and its related metadata in the test? It
passes without _Z3usev.
https://github.com/llvm/llvm-project/pull/182442
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits