// If this is a complete composite type then include it in the
// list of global types.
- addGlobalType(Ty, Entry->getEntry());
+ addGlobalType(Ty);
}
/// addGlobalType - Add a new global type to the compile unit.
///
-void CompileUnit::addGlobalType(DIType Ty, DIE *Die) {
+void CompileUnit::addGlobalType(DIType Ty) {
DIDescriptor Context = Ty.getContext();
if (Ty.isCompositeType() && !Ty.getName().empty() && !Ty.isForwardDecl()
&& (Context.isCompileUnit() || Context.isFile() || Context.isNameSpace()))
- GlobalTypes[Ty.getName()] = Die;
+ if (DIEEntry *Entry = getDIEEntry(Ty))
+ GlobalTypes[Ty.getName()] = Entry->getEntry();
}
/// addPubTypes - Add type for pubtypes section.
DIType ATy(Args.getElement(i));
if (!ATy.Verify())
continue;
- addGlobalType(ATy, getDIEEntry(ATy)->getEntry());
+ addGlobalType(ATy);
}
}
/// addGlobalType - Add a new global type to the compile unit.
///
- void addGlobalType(DIType Ty, DIE *Die);
+ void addGlobalType(DIType Ty);
/// getDIE - Returns the debug information entry map slot for the
/// specified debug variable.