mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Avoid showing line number when its not relevant
This commit is contained in:
parent
e2dad5f838
commit
e2428a11a3
3 changed files with 23 additions and 16 deletions
|
@ -322,10 +322,10 @@ namespace IDE
|
||||||
}
|
}
|
||||||
else
|
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(" ");
|
linkLine.Append(" ");
|
||||||
IDEUtils.AppendWithOptionalQuotes(linkLine, scope String("-L", llvmDir, "/lib/gcc/x86_64-w64-mingw32/5.2.0"));
|
IDEUtils.AppendWithOptionalQuotes(linkLine, scope String("-L", llvmDir, "/lib/gcc/x86_64-w64-mingw32/5.2.0"));
|
||||||
linkLine.Append(" ");
|
linkLine.Append(" ");*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Microsoft
|
else // Microsoft
|
||||||
|
|
|
@ -170,6 +170,7 @@ file(GLOB SRC_FILES
|
||||||
Compiler/BfSystem.cpp
|
Compiler/BfSystem.cpp
|
||||||
Compiler/BfUtil.cpp
|
Compiler/BfUtil.cpp
|
||||||
Compiler/BfVarDeclChecker.cpp
|
Compiler/BfVarDeclChecker.cpp
|
||||||
|
Compiler/BfTargetTriple.cpp
|
||||||
Compiler/MemReporter.cpp
|
Compiler/MemReporter.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -390,6 +390,8 @@ void BfIRCodeGen::Fail(const StringImpl& error)
|
||||||
if (mFailed)
|
if (mFailed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (mHasDebugLoc)
|
||||||
|
{
|
||||||
auto dbgLoc = mIRBuilder->getCurrentDebugLocation();
|
auto dbgLoc = mIRBuilder->getCurrentDebugLocation();
|
||||||
if (dbgLoc)
|
if (dbgLoc)
|
||||||
{
|
{
|
||||||
|
@ -400,6 +402,7 @@ void BfIRCodeGen::Fail(const StringImpl& error)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BfIRCodeGenBase::Fail(error);
|
BfIRCodeGenBase::Fail(error);
|
||||||
}
|
}
|
||||||
|
@ -2615,6 +2618,7 @@ void BfIRCodeGen::HandleNextCmd()
|
||||||
case BfIRCmd_StatementStart:
|
case BfIRCmd_StatementStart:
|
||||||
// We only commit the debug loc for statement starts
|
// We only commit the debug loc for statement starts
|
||||||
mIRBuilder->SetCurrentDebugLocation(mDebugLoc);
|
mIRBuilder->SetCurrentDebugLocation(mDebugLoc);
|
||||||
|
mHasDebugLoc = true;
|
||||||
break;
|
break;
|
||||||
case BfIRCmd_ObjectAccessCheck:
|
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;
|
bool enableLTO = codeGenOptions.mLTOType != BfLTOType_None;
|
||||||
|
|
||||||
if (enableLTO)
|
if (enableLTO)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue