mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
Fix error reporting in register scavenger (lack of emergency spill slot)
- Do not store Twine objects. - Remove report_fatal_error, since llvm_unreachable does terminate the program in release mode. llvm-svn: 270233
This commit is contained in:
parent
e037aadc61
commit
e163deaf59
@ -440,13 +440,10 @@ unsigned RegScavenger::scavengeRegister(const TargetRegisterClass *RC,
|
||||
// Spill the scavenged register before I.
|
||||
int FI = Scavenged[SI].FrameIndex;
|
||||
if (FI < FIB || FI >= FIE) {
|
||||
Twine Msg = Twine("Error while trying to spill ") + TRI->getName(SReg) +
|
||||
" from class " + TRI->getRegClassName(RC) +
|
||||
": Cannot scavenge register without an emergency spill slot!";
|
||||
// Keep both error functions, since llvm_unreachable prints the call
|
||||
// stack, but it does not terminate program in release mode.
|
||||
llvm_unreachable(Msg.str().c_str());
|
||||
report_fatal_error(Msg);
|
||||
std::string Msg = std::string("Error while trying to spill ") +
|
||||
TRI->getName(SReg) + " from class " + TRI->getRegClassName(RC) +
|
||||
": Cannot scavenge register without an emergency spill slot!";
|
||||
llvm_unreachable(Msg.c_str());
|
||||
}
|
||||
TII->storeRegToStackSlot(*MBB, I, SReg, true, Scavenged[SI].FrameIndex,
|
||||
RC, TRI);
|
||||
|
Loading…
Reference in New Issue
Block a user