KDAB engineer Shivam Kunwar contributed a fix to LLVM/Clang that enables debuggers to display constexpr array contents in optimized builds. Previously, inspecting static constexpr arrays under -O2 showed "no symbol in current context", now GDB and LLDB show the actual values. A small but meaningful improvement for anyone debugging optimized C++. #LLVM #Clang #DebugInfo #DWARF #CPlusPlus #OpenSource
More details:
https://github.com/llvm/llvm-project/pull/182442

[DebugInfo] Emit DW_AT_const_value for constexpr array static members by phyBrackets · Pull Request #182442 · llvm/llvm-project
Clang does not emit a DW_AT_const_value in DWARF, while GCC does. This patch fixes this issue through handling Array APValues and respective handling in the backend through ConstantDataSequential F...