[llvm] [LLVM][DWARF] Add support for monolithic types in .debug_names (PR #70515)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 30 13:58:00 PDT 2023
================
@@ -265,18 +280,25 @@ class DWARF5AccelTableData : public AccelTableData {
"Accessing DIE Offset before normalizing.");
return std::get<uint64_t>(OffsetVal);
}
- unsigned getDieTag() const { return DieTag; }
- unsigned getUnitID() const { return UnitID; }
+ unsigned getDieTag() const { return Data.DieTag; }
+ unsigned getUnitID() const { return Data.UnitID; }
+ bool isTU() const { return Data.IsTU; }
void normalizeDIEToOffset() {
assert(std::holds_alternative<const DIE *>(OffsetVal) &&
"Accessing offset after normalizing.");
OffsetVal = std::get<const DIE *>(OffsetVal)->getOffset();
}
+ bool isNormalized() const {
+ return std::holds_alternative<uint64_t>(OffsetVal);
+ }
protected:
std::variant<const DIE *, uint64_t> OffsetVal;
- unsigned DieTag;
- unsigned UnitID;
+ struct MetaData {
----------------
dwblaikie wrote:
I don't think this struct is necessary - could these members be moved out into the surrounding DWARF5AccelTableData?
https://github.com/llvm/llvm-project/pull/70515
More information about the llvm-commits
mailing list