forked from OSchip/llvm-project
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
f75c2bfc6b
commit
64439ac775
|
@ -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