DebugInfo: Sink accelerator table lists down (GlobalNames/Types) into DwarfCompileUnit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221083 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-11-02 06:16:39 +00:00
parent 5ede09079b
commit 21cd65acf4
6 changed files with 42 additions and 33 deletions

View File

@ -694,5 +694,22 @@ void DwarfCompileUnit::emitHeader(const MCSymbol *ASectionSym) const {
DwarfUnit::emitHeader(ASectionSym);
}
/// addGlobalName - Add a new global name to the compile unit.
void DwarfCompileUnit::addGlobalName(StringRef Name, DIE &Die,
DIScope Context) {
if (getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly)
return;
std::string FullName = getParentContextString(Context) + Name.str();
GlobalNames[FullName] = &Die;
}
/// Add a new global type to the unit.
void DwarfCompileUnit::addGlobalType(DIType Ty, const DIE &Die,
DIScope Context) {
if (getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly)
return;
std::string FullName = getParentContextString(Context) + Ty.getName().str();
GlobalTypes[FullName] = &Die;
}
} // end llvm namespace