// If this is a complete composite type then include it in the
// list of global types.
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.
for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(),
E = CUMap.end(); I != E; ++I) {
CompileUnit *TheCU = I->second;
- const StringMap<DIE*> &Names = TheCU->getGlobalTypes();
- //TODO: TheCU->getAccelTypes();
+ const StringMap<DIE*> &Names = TheCU->getAccelTypes();
for (StringMap<DIE*>::const_iterator
GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) {
const char *Name = GI->getKeyData();