forked from OSchip/llvm-project
Allocate the contents of DwarfDebug's StringMaps in a single big BumpPtrAllocator.
llvm-svn: 158265
This commit is contained in:
parent
556eab8878
commit
0748008df5
|
@ -126,6 +126,7 @@ DIType DbgVariable::getType() const {
|
|||
DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
|
||||
: Asm(A), MMI(Asm->MMI), FirstCU(0),
|
||||
AbbreviationsSet(InitAbbreviationsSetSize),
|
||||
SourceIdMap(DIEValueAllocator), StringPool(DIEValueAllocator),
|
||||
PrevLabel(NULL) {
|
||||
NextStringPoolNumber = 0;
|
||||
|
||||
|
|
|
@ -188,6 +188,9 @@ class DwarfDebug {
|
|||
/// MMI - Collected machine module information.
|
||||
MachineModuleInfo *MMI;
|
||||
|
||||
/// DIEValueAllocator - All DIEValues are allocated through this allocator.
|
||||
BumpPtrAllocator DIEValueAllocator;
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// Attributes used to construct specific Dwarf sections.
|
||||
//
|
||||
|
@ -210,11 +213,11 @@ class DwarfDebug {
|
|||
|
||||
/// SourceIdMap - Source id map, i.e. pair of source filename and directory,
|
||||
/// separated by a zero byte, mapped to a unique id.
|
||||
StringMap<unsigned> SourceIdMap;
|
||||
StringMap<unsigned, BumpPtrAllocator&> SourceIdMap;
|
||||
|
||||
/// StringPool - A String->Symbol mapping of strings used by indirect
|
||||
/// references.
|
||||
StringMap<std::pair<MCSymbol*, unsigned> > StringPool;
|
||||
StringMap<std::pair<MCSymbol*, unsigned>, BumpPtrAllocator&> StringPool;
|
||||
unsigned NextStringPoolNumber;
|
||||
|
||||
/// SectionMap - Provides a unique id per text section.
|
||||
|
@ -292,9 +295,6 @@ class DwarfDebug {
|
|||
|
||||
std::vector<FunctionDebugFrameInfo> DebugFrames;
|
||||
|
||||
// DIEValueAllocator - All DIEValues are allocated through this allocator.
|
||||
BumpPtrAllocator DIEValueAllocator;
|
||||
|
||||
// Section Symbols: these are assembler temporary labels that are emitted at
|
||||
// the beginning of each supported dwarf section. These are used to form
|
||||
// section offsets and are created by EmitSectionLabels.
|
||||
|
|
Loading…
Reference in New Issue