mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Fixed debug loc issue with line=0 col>0
This commit is contained in:
parent
f6c49b1084
commit
47732ae09c
2 changed files with 6 additions and 1 deletions
|
@ -4063,6 +4063,8 @@ void BfIRCodeGen::HandleNextCmd()
|
|||
CMD_PARAM(int, column);
|
||||
CMD_PARAM(llvm::MDNode*, diScope);
|
||||
CMD_PARAM(llvm::MDNode*, diInlinedAt);
|
||||
if (line == 0)
|
||||
column = 0;
|
||||
mDebugLoc = llvm::DILocation::get(*mLLVMContext, line, column, diScope, diInlinedAt);
|
||||
}
|
||||
break;
|
||||
|
@ -4766,6 +4768,8 @@ void BfIRCodeGen::HandleNextCmd()
|
|||
CMD_PARAM(llvm::MDNode*, file);
|
||||
CMD_PARAM(int, lineNum);
|
||||
CMD_PARAM(int, col);
|
||||
if (lineNum == 0)
|
||||
col = 0;
|
||||
BF_ASSERT(file != NULL);
|
||||
SetResult(curId, mDIBuilder->createLexicalBlock((llvm::DIScope*)scope, (llvm::DIFile*)file, (unsigned)lineNum, (unsigned)col));
|
||||
}
|
||||
|
|
|
@ -2677,6 +2677,7 @@ void BfModule::UpdateSrcPos(BfAstNode* astNode, BfSrcPosFlags flags, int debugLo
|
|||
{
|
||||
mCurFilePosition.mFileInstance = bfFileInstance;
|
||||
mCurFilePosition.mCurLine = 0;
|
||||
mCurFilePosition.mCurColumn = 0;
|
||||
mCurFilePosition.mCurSrcPos = 0;
|
||||
}
|
||||
}
|
||||
|
@ -2700,7 +2701,7 @@ void BfModule::UpdateSrcPos(BfAstNode* astNode, BfSrcPosFlags flags, int debugLo
|
|||
mCurFilePosition.mCurColumn = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
mCurFilePosition.mCurColumn++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue