Skip to content

Commit 2130863

Browse files
mateuszchudykigcbot
authored andcommitted
Temporary WA: skip adding DIImportedEntity if its scope is null
Temporary WA: skip adding DIImportedEntity if its scope is null
1 parent 49efc0a commit 2130863

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

IGC/DebugInfo/DwarfCompileUnit.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,13 @@ class CompileUnit {
399399

400400
void addImportedEntity(const llvm::DIImportedEntity *IE) {
401401
llvm::DIScope *Scope = IE->getScope();
402-
assert(Scope && "Invalid Scope encoding!");
402+
403+
// Temporary workaround
404+
if (!Scope) {
405+
return;
406+
}
407+
// assert(Scope && "Invalid Scope encoding!");
408+
403409
if (!llvm::isa<llvm::DILocalScope>(Scope)) {
404410
// No need to add imported enities that are not local declaration.
405411
return;

0 commit comments

Comments
 (0)