1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Avoid showing line number when its not relevant

This commit is contained in:
Brian Fiete 2019-10-17 06:47:50 -07:00
parent e2dad5f838
commit e2428a11a3
3 changed files with 23 additions and 16 deletions

View file

@ -322,10 +322,10 @@ namespace IDE
}
else
{
IDEUtils.AppendWithOptionalQuotes(linkLine, scope String("-L", llvmDir, "/x86_64-w64-mingw32/lib"));
/*IDEUtils.AppendWithOptionalQuotes(linkLine, scope String("-L", llvmDir, "/x86_64-w64-mingw32/lib"));
linkLine.Append(" ");
IDEUtils.AppendWithOptionalQuotes(linkLine, scope String("-L", llvmDir, "/lib/gcc/x86_64-w64-mingw32/5.2.0"));
linkLine.Append(" ");
linkLine.Append(" ");*/
}
}
else // Microsoft

View file

@ -170,6 +170,7 @@ file(GLOB SRC_FILES
Compiler/BfSystem.cpp
Compiler/BfUtil.cpp
Compiler/BfVarDeclChecker.cpp
Compiler/BfTargetTriple.cpp
Compiler/MemReporter.cpp
)

View file

@ -390,6 +390,8 @@ void BfIRCodeGen::Fail(const StringImpl& error)
if (mFailed)
return;
if (mHasDebugLoc)
{
auto dbgLoc = mIRBuilder->getCurrentDebugLocation();
if (dbgLoc)
{
@ -400,6 +402,7 @@ void BfIRCodeGen::Fail(const StringImpl& error)
return;
}
}
}
BfIRCodeGenBase::Fail(error);
}
@ -2615,6 +2618,7 @@ void BfIRCodeGen::HandleNextCmd()
case BfIRCmd_StatementStart:
// We only commit the debug loc for statement starts
mIRBuilder->SetCurrentDebugLocation(mDebugLoc);
mHasDebugLoc = true;
break;
case BfIRCmd_ObjectAccessCheck:
{
@ -3942,6 +3946,8 @@ bool BfIRCodeGen::WriteObjectFile(const StringImpl& outFileName, const BfCodeGen
//
// }
mHasDebugLoc = false; // So fails don't show a line number
bool enableLTO = codeGenOptions.mLTOType != BfLTOType_None;
if (enableLTO)