From f4599942fb3063a879985e51360c2c0d46685df4 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Sun, 24 May 2015 16:44:32 +0000 Subject: AsmPrinter: Use DwarfStringPoolEntry in DwarfAccelTable, NFC This is just an API change, but it prepares to stop using `EmitLabelDifference()` when possible. llvm-svn: 238118 --- llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp index dfc61e69a88..ca953b982c2 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp @@ -30,14 +30,14 @@ DwarfAccelTable::DwarfAccelTable(ArrayRef atomList) : Header(8 + (atomList.size() * 4)), HeaderData(atomList), Entries(Allocator) {} -void DwarfAccelTable::AddName(StringRef Name, MCSymbol *StrSym, const DIE *die, +void DwarfAccelTable::AddName(DwarfStringPoolEntryRef Name, const DIE *die, char Flags) { assert(Data.empty() && "Already finalized!"); // If the string is in the list already then add this die to the list // otherwise add a new one. - DataArray &DIEs = Entries[Name]; - assert(!DIEs.StrSym || DIEs.StrSym == StrSym); - DIEs.StrSym = StrSym; + DataArray &DIEs = Entries[Name.getString()]; + assert(!DIEs.Name || DIEs.Name == Name); + DIEs.Name = Name; DIEs.Values.push_back(new (Allocator) HashDataContents(die, Flags)); } @@ -216,7 +216,7 @@ void DwarfAccelTable::EmitData(AsmPrinter *Asm, DwarfDebug *D) { // Remember to emit the label for our offset. Asm->OutStreamer->EmitLabel((*HI)->Sym); Asm->OutStreamer->AddComment((*HI)->Str); - Asm->emitSectionOffset((*HI)->Data.StrSym); + Asm->emitSectionOffset((*HI)->Data.Name.getSymbol()); Asm->OutStreamer->AddComment("Num DIEs"); Asm->EmitInt32((*HI)->Data.Values.size()); for (HashDataContents *HD : (*HI)->Data.Values) { -- cgit v1.2.3