[all-commits] [llvm/llvm-project] 7f3ee3: [clang][DebugInfo] Revert to attaching DW_AT_const...
Michael Buch via All-commits
all-commits at lists.llvm.org
Tue Nov 28 07:40:57 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7f3ee3ca1d09daf0f7d350ed9d62796640a59bf4
https://github.com/llvm/llvm-project/commit/7f3ee3ca1d09daf0f7d350ed9d62796640a59bf4
Author: Michael Buch <michaelbuch12 at gmail.com>
Date: 2023-11-28 (Tue, 28 Nov 2023)
Changed paths:
M clang/lib/CodeGen/CGDebugInfo.cpp
M clang/test/CodeGenCXX/debug-info-static-inline-member.cpp
M clang/test/CodeGenCXX/debug-info-static-member.cpp
Log Message:
-----------
[clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (#73626)
In https://github.com/llvm/llvm-project/pull/71780 we started emitting
definitions for all static data-members with constant initialisers, even
if they were constants (i.e., didn't have a location). We also dropped
the DW_AT_const_value from the declaration to [help resolve
inconsistencies during type merging in the
DWARFParallelLinker](https://github.com/llvm/llvm-project/pull/68721).
However, for static data members that do have locations, we wouldn't
emit a DW_AT_const_value on it, assuming that the consumer knows how to
read the value using the location. This broke some consumers that really
wanted to find a DW_AT_const_value. Ultimately we want to attach a
DW_AT_const_value to definitions that have a location too. But to fix
consumers broken by said change, this patch adds the constant back onto
the declaration. This is what we used to do prior to
https://github.com/llvm/llvm-project/pull/71780
More information about the All-commits
mailing list