summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/RegisterScavenging.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/RegisterScavenging.cpp b/llvm/lib/CodeGen/RegisterScavenging.cpp
index 34302a0cac6..4017f88f4ef 100644
--- a/llvm/lib/CodeGen/RegisterScavenging.cpp
+++ b/llvm/lib/CodeGen/RegisterScavenging.cpp
@@ -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);
OpenPOWER on IntegriCloud