31 changes: 8 additions & 23 deletions llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,16 +305,14 @@ void Loc::MMI::addFrameIndexExpr(const DIExpression *Expr, int FI) {

static AccelTableKind computeAccelTableKind(unsigned DwarfVersion,
bool GenerateTypeUnits,
bool HasSplitDwarf,
DebuggerKind Tuning,
const Triple &TT) {
// Honor an explicit request.
if (AccelTables != AccelTableKind::Default)
return AccelTables;

// Accelerator tables with type units are currently not supported.
if (GenerateTypeUnits &&
(DwarfVersion < 5 || HasSplitDwarf || !TT.isOSBinFormatELF()))
if (GenerateTypeUnits)
return AccelTableKind::None;

// Accelerator tables get emitted if targetting DWARF v5 or LLDB. DWARF v5
Expand All @@ -327,9 +325,6 @@ static AccelTableKind computeAccelTableKind(unsigned DwarfVersion,
: AccelTableKind::Dwarf;
return AccelTableKind::None;
}
void DwarfDebug::addTypeUnit(std::unique_ptr<DwarfTypeUnit> U) {
InfoHolder.addTypeUnit(std::move(U));
}

DwarfDebug::DwarfDebug(AsmPrinter *A)
: DebugHandlerBase(A), DebugLocs(A->OutStreamer->isVerboseAsm()),
Expand Down Expand Up @@ -405,9 +400,8 @@ DwarfDebug::DwarfDebug(AsmPrinter *A)
A->TM.getTargetTriple().isOSBinFormatWasm()) &&
GenerateDwarfTypeUnits;

TheAccelTableKind =
computeAccelTableKind(DwarfVersion, GenerateTypeUnits, HasSplitDwarf,
DebuggerTuning, A->TM.getTargetTriple());
TheAccelTableKind = computeAccelTableKind(
DwarfVersion, GenerateTypeUnits, DebuggerTuning, A->TM.getTargetTriple());

// Work around a GDB bug. GDB doesn't support the standard opcode;
// SCE doesn't support GNU's; LLDB prefers the standard opcode, which
Expand Down Expand Up @@ -2400,7 +2394,7 @@ void DwarfDebug::emitAccelDebugNames() {
if (getUnits().empty())
return;

emitDWARF5AccelTable(Asm, AccelDebugNames, *this, getUnits(), getTypeUnits());
emitDWARF5AccelTable(Asm, AccelDebugNames, *this, getUnits());
}

// Emit visible names into a hashed accelerator table section.
Expand Down Expand Up @@ -3505,7 +3499,7 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
// Types referencing entries in the address table cannot be placed in type
// units.
if (AddrPool.hasBeenUsed()) {
AccelTypeUntsDebugNames.clear();

// Remove all the types built while building this type.
// This is pessimistic as some of these types might not be dependent on
// the type that used an address.
Expand All @@ -3520,15 +3514,11 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
return;
}

// If the type wasn't dependent on fission addresses, finish adding the type
// and all its dependent types.
for (auto &TU : TypeUnitsToAdd) {
InfoHolder.computeSizeAndOffsetsForUnit(TU.first.get());
InfoHolder.emitUnit(TU.first.get(), useSplitDwarf());
if (getDwarfVersion() >= 5 &&
getAccelTableKind() == AccelTableKind::Dwarf) {
addTypeUnit(std::move(TU.first));
AccelDebugNames.addEntries(AccelTypeUntsDebugNames);
AccelTypeUntsDebugNames.clear();
}
}
}
CU.addDIETypeSignature(RefDie, Signature);
Expand Down Expand Up @@ -3558,12 +3548,7 @@ void DwarfDebug::addAccelNameImpl(const DICompileUnit &CU,
AppleAccel.addName(Ref, Die);
break;
case AccelTableKind::Dwarf:
// The type unit can be discarded, so need to add references to final
// acceleration table once we know it's complete and we emit it.
if (TypeUnitsUnderConstruction.empty())
AccelDebugNames.addName(Ref, Die);
else
AccelTypeUntsDebugNames.addName(Ref, Die);
AccelDebugNames.addName(Ref, Die);
break;
case AccelTableKind::Default:
llvm_unreachable("Default should have already been resolved.");
Expand Down
11 changes: 0 additions & 11 deletions llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ class DwarfDebug : public DebugHandlerBase {

/// Accelerator tables.
AccelTable<DWARF5AccelTableData> AccelDebugNames;
AccelTable<DWARF5AccelTableData> AccelTypeUntsDebugNames;
AccelTable<AppleAccelTableOffsetData> AccelNames;
AccelTable<AppleAccelTableOffsetData> AccelObjC;
AccelTable<AppleAccelTableOffsetData> AccelNamespace;
Expand All @@ -516,13 +515,6 @@ class DwarfDebug : public DebugHandlerBase {
return InfoHolder.getUnits();
}

/// Returns Type Units constructed for this module.
const SmallVectorImpl<std::unique_ptr<DwarfTypeUnit>> &getTypeUnits() {
return InfoHolder.getTypeUnits();
}

void addTypeUnit(std::unique_ptr<DwarfTypeUnit> U);

using InlinedEntity = DbgValueHistoryMap::InlinedEntity;

void ensureAbstractEntityIsCreatedIfScoped(DwarfCompileUnit &CU,
Expand Down Expand Up @@ -788,9 +780,6 @@ class DwarfDebug : public DebugHandlerBase {
/// Returns what kind (if any) of accelerator tables to emit.
AccelTableKind getAccelTableKind() const { return TheAccelTableKind; }

/// Seet TheAccelTableKind
void setTheAccelTableKind(AccelTableKind K) { TheAccelTableKind = K; };

bool useAppleExtensionAttributes() const {
return HasAppleExtensionAttributes;
}
Expand Down
4 changes: 0 additions & 4 deletions llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ void DwarfFile::addUnit(std::unique_ptr<DwarfCompileUnit> U) {
CUs.push_back(std::move(U));
}

void DwarfFile::addTypeUnit(std::unique_ptr<DwarfTypeUnit> U) {
TUs.push_back(std::move(U));
}

// Emit the various dwarf units to the unit section USection with
// the abbreviations going into ASection.
void DwarfFile::emitUnits(bool UseOffsets) {
Expand Down
14 changes: 0 additions & 14 deletions llvm/lib/CodeGen/AsmPrinter/DwarfFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class DbgLabel;
class DINode;
class DILocalScope;
class DwarfCompileUnit;
class DwarfTypeUnit;
class DwarfUnit;
class LexicalScope;
class MCSection;
Expand Down Expand Up @@ -60,9 +59,6 @@ class DwarfFile {
// A pointer to all units in the section.
SmallVector<std::unique_ptr<DwarfCompileUnit>, 1> CUs;

// A pointer to all type units in the section.
SmallVector<std::unique_ptr<DwarfTypeUnit>, 1> TUs;

DwarfStringPool StrPool;

// List of range lists for a given compile unit, separate from the ranges for
Expand Down Expand Up @@ -107,11 +103,6 @@ class DwarfFile {
return CUs;
}

/// Returns type units that were constructed.
const SmallVectorImpl<std::unique_ptr<DwarfTypeUnit>> &getTypeUnits() {
return TUs;
}

std::pair<uint32_t, RangeSpanList *> addRange(const DwarfCompileUnit &CU,
SmallVector<RangeSpan, 2> R);

Expand All @@ -133,11 +124,6 @@ class DwarfFile {
/// Add a unit to the list of CUs.
void addUnit(std::unique_ptr<DwarfCompileUnit> U);

/// Add a unit to the list of TUs.
/// Preserves type unit so that memory is not released before DWARF5
/// accelerator table is created.
void addTypeUnit(std::unique_ptr<DwarfTypeUnit> U);

/// Emit all of the units to the section listed with the given
/// abbreviation section.
void emitUnits(bool UseOffsets);
Expand Down
4 changes: 0 additions & 4 deletions llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1778,10 +1778,6 @@ void DwarfUnit::emitCommonHeader(bool UseOffsets, dwarf::UnitType UT) {
}

void DwarfTypeUnit::emitHeader(bool UseOffsets) {
if (!DD->useSplitDwarf()) {
LabelBegin = Asm->createTempSymbol("tu_begin");
Asm->OutStreamer->emitLabel(LabelBegin);
}
DwarfUnit::emitCommonHeader(UseOffsets,
DD->useSplitDwarf() ? dwarf::DW_UT_split_type
: dwarf::DW_UT_type);
Expand Down
9 changes: 0 additions & 9 deletions llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,6 @@ class DwarfTypeUnit final : public DwarfUnit {
DwarfCompileUnit &CU;
MCDwarfDwoLineTable *SplitLineTable;
bool UsedLineTable = false;
/// The start of the type unit within .debug_nfo section.
MCSymbol *LabelBegin = nullptr;

unsigned getOrCreateSourceID(const DIFile *File) override;
void finishNonUnitTypeDIE(DIE& D, const DICompositeType *CTy) override;
Expand All @@ -374,8 +372,6 @@ class DwarfTypeUnit final : public DwarfUnit {
DwarfFile *DWU, MCDwarfDwoLineTable *SplitLineTable = nullptr);

void setTypeSignature(uint64_t Signature) { TypeSignature = Signature; }
/// Returns Type Signature.
uint64_t getTypeSignature() const { return TypeSignature; }
void setType(const DIE *Ty) { this->Ty = Ty; }

/// Emit the header for this unit, not including the initial length field.
Expand All @@ -389,11 +385,6 @@ class DwarfTypeUnit final : public DwarfUnit {
void addGlobalType(const DIType *Ty, const DIE &Die,
const DIScope *Context) override;
DwarfCompileUnit &getCU() override { return CU; }
/// Get the the symbol for start of the section for this type unit.
MCSymbol *getLabelBegin() const {
assert(LabelBegin && "LabelBegin is not initialized");
return LabelBegin;
}
};
} // end llvm namespace
#endif
13 changes: 2 additions & 11 deletions llvm/lib/DWARFLinker/DWARFStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,19 +307,10 @@ void DwarfStreamer::emitDebugNames(
}

Asm->OutStreamer->switchSection(MOFI->getDwarfDebugNamesSection());
dwarf::Form Form = DIEInteger::BestForm(/*IsSigned*/ false,
(uint64_t)UniqueIdToCuMap.size() - 1);
/// llvm-dwarfutil doesn't support type units + .debug_names right now anyway,
/// so just keeping current behavior.
emitDWARF5AccelTable(
Asm.get(), Table, CompUnits,
[&UniqueIdToCuMap, &Form](const DWARF5AccelTableStaticData &Entry)
-> GetIndexForEntryReturnType {
GetIndexForEntryReturnType Index = std::nullopt;
if (UniqueIdToCuMap.size() > 1)
Index = {UniqueIdToCuMap[Entry.getCUIndex()],
{dwarf::DW_IDX_compile_unit, Form}};
return Index;
[&UniqueIdToCuMap](const DWARF5AccelTableStaticData &Entry) {
return UniqueIdToCuMap[Entry.getCUIndex()];
});
}

Expand Down
18 changes: 4 additions & 14 deletions llvm/lib/DWARFLinkerParallel/DWARFEmitterImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,20 +230,10 @@ void DwarfEmitterImpl::emitDebugNames(
return;

Asm->OutStreamer->switchSection(MOFI->getDwarfDebugNamesSection());
dwarf::Form Form =
DIEInteger::BestForm(/*IsSigned*/ false, (uint64_t)CUidToIdx.size() - 1);
/// DWARFLinker doesn't support type units + .debug_names right now anyway,
/// so just keeping current behavior.
emitDWARF5AccelTable(
Asm.get(), Table, CUOffsets,
[&CUidToIdx, &Form](const DWARF5AccelTableStaticData &Entry)
-> GetIndexForEntryReturnType {
GetIndexForEntryReturnType Index = std::nullopt;
if (CUidToIdx.size() > 1)
Index = {CUidToIdx[Entry.getCUIndex()],
{dwarf::DW_IDX_compile_unit, Form}};
return Index;
});
emitDWARF5AccelTable(Asm.get(), Table, CUOffsets,
[&CUidToIdx](const DWARF5AccelTableStaticData &Entry) {
return CUidToIdx[Entry.getCUIndex()];
});
}

void DwarfEmitterImpl::emitAppleNamespaces(
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ std::optional<uint64_t> DWARFDebugNames::Entry::getCUOffset() const {
}

void DWARFDebugNames::Entry::dump(ScopedPrinter &W) const {
DictScope AbbrevScope(W, ("Abbrev: 0x" + Twine::utohexstr(Abbr->Code)).str());
W.printHex("Abbrev", Abbr->Code);
W.startLine() << formatv("Tag: {0}\n", Abbr->Tag);
assert(Abbr->Attributes.size() == Values.size());
for (auto Tuple : zip_first(Abbr->Attributes, Values)) {
Expand Down
1 change: 1 addition & 0 deletions llvm/test/DebugInfo/X86/accel-tables-dwarf5.ll
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
; RUN: | llvm-readobj --sections - | FileCheck --check-prefix=DEBUG_NAMES %s

; NONE-NOT: apple_names
; NONE-NOT: debug_names

; DEBUG_NAMES-NOT: apple_names
; DEBUG_NAMES: debug_names
Expand Down
22 changes: 10 additions & 12 deletions llvm/test/DebugInfo/X86/debug-names-dwarf64.ll
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
; CHECK-NEXT: CU[0]: 0x00000000
; CHECK-NEXT: ]
; CHECK-NEXT: Abbreviations [
; CHECK-NEXT: Abbreviation [[ABBREV:0x[0-9a-f]*]] {
; CHECK-NEXT: Tag: DW_TAG_base_type
; CHECK-NEXT: Abbreviation 0x34 {
; CHECK-NEXT: Tag: DW_TAG_variable
; CHECK-NEXT: DW_IDX_die_offset: DW_FORM_ref4
; CHECK-NEXT: }
; CHECK-NEXT: Abbreviation [[ABBREV1:0x[0-9a-f]*]] {
; CHECK-NEXT: Tag: DW_TAG_variable
; CHECK-NEXT: Abbreviation 0x24 {
; CHECK-NEXT: Tag: DW_TAG_base_type
; CHECK-NEXT: DW_IDX_die_offset: DW_FORM_ref4
; CHECK-NEXT: }
; CHECK-NEXT: ]
Expand All @@ -40,10 +40,9 @@
; CHECK-NEXT: Hash: 0xB888030
; CHECK-NEXT: String: {{.+}} "int"
; CHECK-NEXT: Entry @ {{.+}} {
; CHECK-NEXT: Abbrev: [[ABBREV]] {
; CHECK-NEXT: Tag: DW_TAG_base_type
; CHECK-NEXT: DW_IDX_die_offset: [[TYPEDIE]]
; CHECK-NEXT: }
; CHECK-NEXT: Abbrev: 0x24
; CHECK-NEXT: Tag: DW_TAG_base_type
; CHECK-NEXT: DW_IDX_die_offset: [[TYPEDIE]]
; CHECK-NEXT: }
; CHECK-NEXT: }
; CHECK-NEXT: ]
Expand All @@ -52,10 +51,9 @@
; CHECK-NEXT: Hash: 0xB887389
; CHECK-NEXT: String: {{.+}} "foo"
; CHECK-NEXT: Entry @ {{.+}} {
; CHECK-NEXT: Abbrev: [[ABBREV1]] {
; CHECK-NEXT: Tag: DW_TAG_variable
; CHECK-NEXT: DW_IDX_die_offset: [[VARDIE]]
; CHECK-NEXT: }
; CHECK-NEXT: Abbrev: 0x34
; CHECK-NEXT: Tag: DW_TAG_variable
; CHECK-NEXT: DW_IDX_die_offset: [[VARDIE]]
; CHECK-NEXT: }
; CHECK-NEXT: }
; CHECK-NEXT: ]
Expand Down
168 changes: 0 additions & 168 deletions llvm/test/DebugInfo/X86/debug-names-types-monolithic.ll

This file was deleted.

57 changes: 0 additions & 57 deletions llvm/test/DebugInfo/X86/debug-names-types-split.ll

This file was deleted.

36 changes: 16 additions & 20 deletions llvm/test/DebugInfo/X86/dwarfdump-debug-names.s
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
# CHECK-NEXT: CU[0]: 0x00000000
# CHECK-NEXT: ]
# CHECK-NEXT: Abbreviations [
# CHECK-NEXT: Abbreviation [[ABBREV:0x[0-9a-f]*]] {
# CHECK-NEXT: Abbreviation 0x2e {
# CHECK-NEXT: Tag: DW_TAG_subprogram
# CHECK-NEXT: DW_IDX_die_offset: DW_FORM_ref4
# CHECK-NEXT: }
Expand All @@ -164,20 +164,18 @@
# CHECK-NEXT: Hash: 0xB887389
# CHECK-NEXT: String: 0x00000000 "foo"
# CHECK-NEXT: Entry @ 0x4f {
# CHECK-NEXT: Abbrev: [[ABBREV]]
# CHECK-NEXT: Tag: DW_TAG_subprogram
# CHECK-NEXT: DW_IDX_die_offset: 0x00000001
# CHECK-NEXT: }
# CHECK-NEXT: Abbrev: 0x2E
# CHECK-NEXT: Tag: DW_TAG_subprogram
# CHECK-NEXT: DW_IDX_die_offset: 0x00000001
# CHECK-NEXT: }
# CHECK-NEXT: }
# CHECK-NEXT: Name 2 {
# CHECK-NEXT: Hash: 0xB5063D0B
# CHECK-NEXT: String: 0x00000004 "_Z3foov"
# CHECK-NEXT: Entry @ 0x58 {
# CHECK-NEXT: Abbrev: [[ABBREV]]
# CHECK-NEXT: Tag: DW_TAG_subprogram
# CHECK-NEXT: DW_IDX_die_offset: 0x00000001
# CHECK-NEXT: }
# CHECK-NEXT: Abbrev: 0x2E
# CHECK-NEXT: Tag: DW_TAG_subprogram
# CHECK-NEXT: DW_IDX_die_offset: 0x00000001
# CHECK-NEXT: }
# CHECK-NEXT: }
# CHECK-NEXT: ]
Expand All @@ -199,7 +197,7 @@
# CHECK-NEXT: CU[0]: 0x00000002
# CHECK-NEXT: ]
# CHECK-NEXT: Abbreviations [
# CHECK-NEXT: Abbreviation [[ABBREV1:0x[0-9a-f]*]] {
# CHECK-NEXT: Abbreviation 0x34 {
# CHECK-NEXT: Tag: DW_TAG_variable
# CHECK-NEXT: DW_IDX_die_offset: DW_FORM_ref4
# CHECK-NEXT: }
Expand All @@ -209,10 +207,9 @@
# CHECK-NEXT: Hash: 0xB8860BA
# CHECK-NEXT: String: 0x0000000c "bar"
# CHECK-NEXT: Entry @ 0xa3 {
# CHECK-NEXT: Abbrev: [[ABBREV1]]
# CHECK-NEXT: Tag: DW_TAG_variable
# CHECK-NEXT: DW_IDX_die_offset: 0x00000001
# CHECK-NEXT: }
# CHECK-NEXT: Abbrev: 0x34
# CHECK-NEXT: Tag: DW_TAG_variable
# CHECK-NEXT: DW_IDX_die_offset: 0x00000001
# CHECK-NEXT: }
# CHECK-NEXT: }
# CHECK-NEXT: ]
Expand Down Expand Up @@ -240,7 +237,7 @@
# CHECK-NEXT: ForeignTU[0]: 0xffffff00ffffffff
# CHECK-NEXT: ]
# CHECK-NEXT: Abbreviations [
# CHECK-NEXT: Abbreviation [[ABBREV2:0x[0-9a-f]*]] {
# CHECK-NEXT: Abbreviation 0x1 {
# CHECK-NEXT: Tag: DW_TAG_base_type
# CHECK-NEXT: DW_IDX_type_unit: DW_FORM_data4
# CHECK-NEXT: DW_IDX_type_hash: DW_FORM_data8
Expand All @@ -251,11 +248,10 @@
# CHECK-NEXT: Hash: 0xB887389
# CHECK-NEXT: String: 0x00000000 "foo"
# CHECK-NEXT: Entry @ 0x111 {
# CHECK-NEXT: Abbrev: [[ABBREV2]]
# CHECK-NEXT: Tag: DW_TAG_base_type
# CHECK-NEXT: DW_IDX_type_unit: 0x00000001
# CHECK-NEXT: DW_IDX_type_hash: 0x0000ff03ffffffff
# CHECK-NEXT: }
# CHECK-NEXT: Abbrev: 0x1
# CHECK-NEXT: Tag: DW_TAG_base_type
# CHECK-NEXT: DW_IDX_type_unit: 0x00000001
# CHECK-NEXT: DW_IDX_type_hash: 0x0000ff03ffffffff
# CHECK-NEXT: }
# CHECK-NEXT: }
# CHECK-NEXT: ]
Expand Down
18 changes: 9 additions & 9 deletions llvm/test/tools/dsymutil/ARM/accel-imported-declarations.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ RUN: dsymutil -accelerator=Apple -oso-prepend-path=%p/../Inputs %p/../Inputs/acc
RUN: llvm-dwarfdump -v %t.dwarf.dSYM | FileCheck %s -check-prefixes=DWARF,COMMON
RUN: llvm-dwarfdump -v %t.apple.dSYM | FileCheck %s -check-prefixes=APPLE,COMMON

RUN2: dsymutil --linker llvm -accelerator=Dwarf -oso-prepend-path=%p/../Inputs \
RUN2: %p/../Inputs/accel-imported-declaration.macho-arm64 -o %t.dwarf.dSYM
RUN2: dsymutil --linker llvm -accelerator=Apple -oso-prepend-path=%p/../Inputs \
RUN2: %p/../Inputs/accel-imported-declaration.macho-arm64 -o %t.apple.dSYM
RUN2: llvm-dwarfdump -v %t.dwarf.dSYM | FileCheck %s -check-prefixes=DWARF,COMMON
RUN2: llvm-dwarfdump -v %t.apple.dSYM | FileCheck %s -check-prefixes=APPLE,COMMON
RUN: dsymutil --linker llvm -accelerator=Dwarf -oso-prepend-path=%p/../Inputs \
RUN: %p/../Inputs/accel-imported-declaration.macho-arm64 -o %t.dwarf.dSYM
RUN: dsymutil --linker llvm -accelerator=Apple -oso-prepend-path=%p/../Inputs \
RUN: %p/../Inputs/accel-imported-declaration.macho-arm64 -o %t.apple.dSYM

RUN: llvm-dwarfdump -v %t.dwarf.dSYM | FileCheck %s -check-prefixes=DWARF,COMMON
RUN: llvm-dwarfdump -v %t.apple.dSYM | FileCheck %s -check-prefixes=APPLE,COMMON

COMMON: .debug_info contents
COMMON: {{.*}}DW_TAG_namespace
Expand All @@ -28,9 +29,8 @@ DWARF-NEXT: Hash: {{.*}}
DWARF-NEXT: String: {{.*}} "C"
DWARF-NEXT: Entry {{.*}} {
DWARF-NEXT: Abbrev: {{.*}}
DWARF-NEXT: Tag: DW_TAG_namespace
DWARF-NEXT: DW_IDX_die_offset: [[NAMESPACE]]
DWARF-NEXT: }
DWARF-NEXT: Tag: DW_TAG_namespace
DWARF-NEXT: DW_IDX_die_offset: [[NAMESPACE]]
DWARF-NEXT: }
DWARF-NEXT: Entry {{.*}} {
DWARF-NEXT: Abbrev: {{.*}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ CHECK:.debug_abbrev contents:
CHECK-NEXT: Abbrev table for offset: 0x00000000

CHECK: .debug_info contents:
CHECK: 0x00000000: Compile Unit: length = 0x0000004a, format = DWARF32, version = 0x0005, unit_type = DW_UT_compile, abbr_offset = 0x0000, addr_size = 0x08
CHECK: 0x00000000: Compile Unit: length = 0x0000004a, format = DWARF32, version = 0x0005, unit_type = DW_UT_compile, abbr_offset = 0x0000, addr_size = 0x08
CHECK: DW_AT_producer [DW_FORM_strx] (indexed (00000000) string = "Apple clang version 14.0.3 (clang-1403.0.22.14.1)")
CHECK: DW_AT_name [DW_FORM_strx] (indexed (00000001) string = "a.cpp")
CHECK: DW_AT_LLVM_sysroot [DW_FORM_strx] (indexed (00000002) string = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk")
Expand All @@ -59,12 +59,12 @@ CHECK-NEXT: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000000) address = 0x[[
CHECK: DW_AT_linkage_name [DW_FORM_strx] (indexed (00000005) string = "_Z4foo2i")
CHECK: DW_AT_name [DW_FORM_strx] (indexed (00000006) string = "foo2")
CHECK: 0x0000003c: DW_TAG_formal_parameter [3] (0x0000002c)
CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] (0x[[LOCLIST_OFFSET:[0-9a-f]+]]:
CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] (0x[[LOCLIST_OFFSET:[0-9a-f]+]]:
CHECK-NEXT: [0x[[#%.16x,LOCLIST_PAIR_START:]], 0x[[#%.16x,LOCLIST_PAIR_END:]]): [[LOCLIST_EXPR:.*]]
CHECK-NEXT: [0x[[#%.16x,LOCLIST_PAIR_START2:]], 0x[[#%.16x,LOCLIST_PAIR_END2:]]): [[LOCLIST_EXPR2:.*]])
CHECK: DW_AT_name [DW_FORM_strx] (indexed (00000007) string = "a")

CHECK: 0x0000004e: Compile Unit: length = 0x00000072, format = DWARF32, version = 0x0004, abbr_offset = 0x00{{00|5a}}, addr_size = 0x08
CHECK: 0x0000004e: Compile Unit: length = 0x00000072, format = DWARF32, version = 0x0004, abbr_offset = 0x00{{00|5a}}, addr_size = 0x08
CHECK: DW_AT_producer [DW_FORM_strp] ( .debug_str[0x00000001] = "Apple clang version 14.0.3 (clang-1403.0.22.14.1)")
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000e0] = "b.cpp")
CHECK: DW_AT_LLVM_sysroot [DW_FORM_strp] ( .debug_str[0x00000039] = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk")
Expand All @@ -79,7 +79,7 @@ CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x[[#%.16x,LOC_LOWPC
CHECK: DW_AT_linkage_name [DW_FORM_strp] ( .debug_str[0x000000e6] = "_Z3bari")
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000ee] = "bar")
CHECK: 0x0000009d: DW_TAG_formal_parameter {{.*}} (0x00000080)
CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] (0x[[LOC_OFFSET:[0-9a-f]+]]:
CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] (0x[[LOC_OFFSET:[0-9a-f]+]]:
CHECK-NEXT: [0x[[#%.16x,LOC_PAIR_START:]], 0x[[#%.16x,LOC_PAIR_END:]]): [[LOC_EXPR:.*]]
CHECK-NEXT: [0x[[#%.16x,LOC_PAIR_START2:]], 0x[[#%.16x,LOC_PAIR_END2:]]): [[LOC_EXPR2:.*]])
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000f2] = "x")
Expand All @@ -91,7 +91,7 @@ CHECK-NEXT: (0x[[#sub(LOC_PAIR_START2,LOC_LOWPC)]], 0x[[#sub(LOC_PAIR

CHECK: .debug_loclists contents:
CHECK-NEXT: 0x00000000: locations list header: length = 0x00000018, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
CHECK-NEXT: 0x[[LOCLIST_OFFSET]]:
CHECK-NEXT: 0x[[LOCLIST_OFFSET]]:
CHECK-NEXT: DW_LLE_base_addressx (0x0000000000000000)
CHECK-NEXT: DW_LLE_offset_pair (0x[[#sub(LOCLIST_PAIR_START,LOCLIST_LOWPC)]], 0x[[#sub(LOCLIST_PAIR_END,LOCLIST_LOWPC)]])
CHECK-NEXT: DW_LLE_offset_pair (0x[[#sub(LOCLIST_PAIR_START2,LOCLIST_LOWPC)]], 0x[[#sub(LOCLIST_PAIR_END2,LOCLIST_LOWPC)]])
Expand Down Expand Up @@ -205,14 +205,14 @@ CHECK-NEXT: 0x00000028: 000000dc "int"
CHECK: .debug_names contents:
CHECK-NEXT: Name Index @ 0x0 {
CHECK-NEXT: Header {
CHECK-NEXT: Length: 0xC4
CHECK-NEXT: Length: 0xBC
CHECK-NEXT: Format: DWARF32
CHECK-NEXT: Version: 5
CHECK-NEXT: CU count: 2
CHECK-NEXT: Local TU count: 0
CHECK-NEXT: Foreign TU count: 0
CHECK-NEXT: Bucket count: 5
CHECK-NEXT: Name count: 5
CHECK-NEXT: Abbreviations table size: 0x13
CHECK-NEXT: Abbreviations table size: 0x11
CHECK-NEXT: Augmentation: 'LLVM0700'
CHECK-NEXT: }
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
# CHECK: Name 1 {
# CHECK-NEXT: String: 0x00000000 "foo"
# CHECK-NEXT: Entry @ 0x37 {
# CHECK-NEXT: Abbrev: 0x2e
# CHECK-NEXT: Abbrev: 0x2E
# CHECK-NEXT: Tag: DW_TAG_subprogram
# CHECK-NEXT: DW_IDX_die_offset: 0x00000001
# CHECK-NEXT: }
Expand Down