summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-05-20 16:38:34 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-05-20 16:38:34 +0000
commit64439ac775f41d3e781cdb431e8d186c977a8163 (patch)
treead2463dcab76d843cadca416e9b1a174b8703d82 /llvm/lib
parentf75c2bfc6be9d027af85c7c9c0bc22afd362a37a (diff)
downloadbcm5719-llvm-64439ac775f41d3e781cdb431e8d186c977a8163.tar.gz
bcm5719-llvm-64439ac775f41d3e781cdb431e8d186c977a8163.zip
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
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