mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Add all completed and named types to the dwarf type accelerator tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144027 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -634,6 +634,12 @@ void CompileUnit::addType(DIE *Entity, DIType Ty) {
|
|||||||
// If this is a complete composite type then include it in the
|
// If this is a complete composite type then include it in the
|
||||||
// list of global types.
|
// list of global types.
|
||||||
addGlobalType(Ty);
|
addGlobalType(Ty);
|
||||||
|
|
||||||
|
// If this is a named finished type then include it in the list of types
|
||||||
|
// for the accelerator tables.
|
||||||
|
if (!Ty.getName().empty() && !Ty.isForwardDecl())
|
||||||
|
if (DIEEntry *Entry = getDIEEntry(Ty))
|
||||||
|
AccelTypes[Ty.getName()] = Entry->getEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// addGlobalType - Add a new global type to the compile unit.
|
/// addGlobalType - Add a new global type to the compile unit.
|
||||||
|
@ -1834,8 +1834,7 @@ void DwarfDebug::emitAccelTypes() {
|
|||||||
for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(),
|
for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(),
|
||||||
E = CUMap.end(); I != E; ++I) {
|
E = CUMap.end(); I != E; ++I) {
|
||||||
CompileUnit *TheCU = I->second;
|
CompileUnit *TheCU = I->second;
|
||||||
const StringMap<DIE*> &Names = TheCU->getGlobalTypes();
|
const StringMap<DIE*> &Names = TheCU->getAccelTypes();
|
||||||
//TODO: TheCU->getAccelTypes();
|
|
||||||
for (StringMap<DIE*>::const_iterator
|
for (StringMap<DIE*>::const_iterator
|
||||||
GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) {
|
GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) {
|
||||||
const char *Name = GI->getKeyData();
|
const char *Name = GI->getKeyData();
|
||||||
|
Reference in New Issue
Block a user