mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 06:09:05 +00:00
Incomplete type may not have corresponding DIE, so do not check DIEEntry eagerly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132377 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
66658e4dff
commit
c20bdf194a
@ -609,16 +609,17 @@ void CompileUnit::addType(DIE *Entity, DIType Ty) {
|
||||
|
||||
// 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.
|
||||
@ -633,7 +634,7 @@ void CompileUnit::addPubTypes(DISubprogram SP) {
|
||||
DIType ATy(Args.getElement(i));
|
||||
if (!ATy.Verify())
|
||||
continue;
|
||||
addGlobalType(ATy, getDIEEntry(ATy)->getEntry());
|
||||
addGlobalType(ATy);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
|
||||
/// 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.
|
||||
|
Loading…
Reference in New Issue
Block a user