mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
DebugInfoFinder: Check for null imported entities
Don't use the accessors in `DIImportedEntity` on a null pointer. (A WIP patch to make `DIDescriptor` accessors more strict crashes here otherwise.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232833 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
14d8dbd37d
commit
c867853c90
@ -674,6 +674,8 @@ void DebugInfoFinder::processModule(const Module &M) {
|
||||
DIArray Imports = CU.getImportedEntities();
|
||||
for (unsigned i = 0, e = Imports.getNumElements(); i != e; ++i) {
|
||||
DIImportedEntity Import = DIImportedEntity(Imports.getElement(i));
|
||||
if (!Import)
|
||||
continue;
|
||||
DIDescriptor Entity = Import.getEntity().resolve(TypeIdentifierMap);
|
||||
if (Entity.isType())
|
||||
processType(DIType(Entity));
|
||||
|
Loading…
Reference in New Issue
Block a user