Skip to content

Commit 9149da4

Browse files
PawelJureksys_zuul
authored andcommitted
DebugInfo: return empty variable location in case llvm.dbg.declare contains invalid address.
Change-Id: I73c2d068bcfda90894b0851c4f58887c2e467e84
1 parent 0646052 commit 9149da4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

IGC/Compiler/DebugInfo/VISAModule.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,11 @@ VISAVariableLocation VISAModule::GetVariableLocation(const llvm::Instruction* pI
518518
Type* pType = pValue->getType();
519519
if (isDbgDclInst)
520520
{
521-
assert(pType->isPointerTy() && "DBG declare intrinsic must point to an address");
521+
if (!pType->isPointerTy()) {
522+
assert(0 && "DBG declare intrinsic must point to an address");
523+
return VISAVariableLocation();
524+
}
522525
pType = pType->getPointerElementType();
523-
524526
}
525527

526528
bool isInSurface = false;

0 commit comments

Comments
 (0)