[clang] [llvm] [DebugInfo] Emit DW_AT_const_value for constexpr array static members (PR #182442)

Michael Buch via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 3 01:34:37 PST 2026


================
@@ -0,0 +1,65 @@
+; 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};
----------------
Michael137 wrote:

This test-case doesn't really add value because both are represented as an arrays of `i8`s anyway. Let's remove the `BYTES` one.

https://github.com/llvm/llvm-project/pull/182442


More information about the cfe-commits mailing list