mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
AsmPrinter: Avoid creating symbols in DwarfStringPool
Stop creating symbols we don't need in `DwarfStringPool`. The consumers only call `DwarfStringPoolEntryRef::getSymbol()` when DWARF is relocatable, so this just stops creating the unused symbols when it's not. This drops memory usage from 851 MB to 845 MB, around 0.7%. (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238122 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -34,7 +34,10 @@ public:
|
||||
: I(&I) {}
|
||||
|
||||
explicit operator bool() const { return I; }
|
||||
MCSymbol *getSymbol() const { return I->second.Symbol; }
|
||||
MCSymbol *getSymbol() const {
|
||||
assert(I->second.Symbol && "No symbol available!");
|
||||
return I->second.Symbol;
|
||||
}
|
||||
unsigned getOffset() const { return I->second.Offset; }
|
||||
unsigned getIndex() const { return I->second.Index; }
|
||||
StringRef getString() const { return I->first(); }
|
||||
|
Reference in New Issue
Block a user