mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
Remove the unused string section symbol parameter from DwarfFile::emitStrings
And since it /looked/ like the DwarfStrSectionSym was unused, I tried removing it - but then it turned out that DwarfStringPool was reconstructing the same label (and expecting it to have already been emitted) and uses that. So I kept it around, but wanted to pass it in to users - since it seemed a bit silly for DwarfStringPool to have it passed in and returned but itself have no use for it. The only two users don't handle strings in both .dwo and .o files so they only ever need the one symbol - no need to keep it (and have an unused symbol) in the DwarfStringPool used for fission/.dwo. Refactor a bunch of accelerator table usage to remove duplication so I didn't have to touch 4-5 callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217628 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -28,18 +28,13 @@ class StringRef;
|
||||
class DwarfStringPool {
|
||||
StringMap<std::pair<MCSymbol *, unsigned>, BumpPtrAllocator &> Pool;
|
||||
StringRef Prefix;
|
||||
MCSymbol *SectionSymbol;
|
||||
|
||||
public:
|
||||
DwarfStringPool(BumpPtrAllocator &A, AsmPrinter &Asm, StringRef Prefix)
|
||||
: Pool(A), Prefix(Prefix), SectionSymbol(Asm.GetTempSymbol(Prefix)) {}
|
||||
: Pool(A), Prefix(Prefix) {}
|
||||
|
||||
void emit(AsmPrinter &Asm, const MCSection *StrSection,
|
||||
const MCSection *OffsetSection = nullptr,
|
||||
const MCSymbol *StrSecSym = nullptr);
|
||||
|
||||
/// \brief Returns the entry into the start of the pool.
|
||||
MCSymbol *getSectionSymbol();
|
||||
const MCSection *OffsetSection = nullptr);
|
||||
|
||||
/// \brief Returns an entry into the string pool with the given
|
||||
/// string text.
|
||||
|
Reference in New Issue
Block a user