mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-13 05:44:11 +02:00
Fixed getScope call in FatalError
This commit is contained in:
parent
e7181d1746
commit
aae3e558fe
1 changed files with 12 additions and 12 deletions
|
@ -353,7 +353,7 @@ void BfIRCodeGen::FatalError(const StringImpl &err)
|
||||||
failStr += "\n";
|
failStr += "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
auto loc = mIRBuilder->getCurrentDebugLocation();
|
auto loc = mIRBuilder->getCurrentDebugLocation();
|
||||||
auto dbgLoc = loc.getAsMDNode();
|
auto dbgLoc = loc.getAsMDNode();
|
||||||
if (dbgLoc != NULL)
|
if (dbgLoc != NULL)
|
||||||
{
|
{
|
||||||
|
@ -363,18 +363,18 @@ void BfIRCodeGen::FatalError(const StringImpl &err)
|
||||||
failStr += "DbgLoc: ";
|
failStr += "DbgLoc: ";
|
||||||
failStr += str;
|
failStr += str;
|
||||||
failStr += "\n";
|
failStr += "\n";
|
||||||
}
|
|
||||||
|
|
||||||
llvm::MDNode* scope = loc.getScope();
|
llvm::MDNode* scope = loc.getScope();
|
||||||
if (scope != NULL)
|
if (scope != NULL)
|
||||||
{
|
{
|
||||||
std::string str;
|
std::string str;
|
||||||
llvm::raw_string_ostream os(str);
|
llvm::raw_string_ostream os(str);
|
||||||
scope->print(os);
|
scope->print(os);
|
||||||
failStr += "Scope: ";
|
failStr += "Scope: ";
|
||||||
failStr += str;
|
failStr += str;
|
||||||
failStr += "\n";
|
failStr += "\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
failStr += err;
|
failStr += err;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue