1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-07 19:18:19 +02:00

SetCurrentDebugLocation debug check

This commit is contained in:
Brian Fiete 2024-05-21 09:55:09 -04:00
parent 7f480846ed
commit 9e61cdf75d

View file

@ -4764,6 +4764,20 @@ void BfIRCodeGen::HandleNextCmd()
column = 0;
mCurLine = line;
mDebugLoc = llvm::DILocation::get(*mLLVMContext, line, column, diScope, diInlinedAt);
#ifdef _DEBUG
llvm::DILocation* DL = mDebugLoc;
if (DL != NULL)
{
llvm::Metadata* Parent = DL->getRawScope();
llvm::DILocalScope* Scope = DL->getInlinedAtScope();
llvm::DISubprogram* SP = Scope->getSubprogram();
if (SP != NULL)
{
BF_ASSERT(SP->describes(mActiveFunction));
}
}
#endif
}
break;
case BfIRCmd_Nop: