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:
parent
7f480846ed
commit
9e61cdf75d
1 changed files with 14 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue