summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/MC/MCRegisterInfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCRegisterInfo.cpp b/llvm/lib/MC/MCRegisterInfo.cpp
index 8e47963b441..5abae537986 100644
--- a/llvm/lib/MC/MCRegisterInfo.cpp
+++ b/llvm/lib/MC/MCRegisterInfo.cpp
@@ -13,6 +13,7 @@
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/Twine.h"
#include "llvm/Support/ErrorHandling.h"
#include <algorithm>
#include <cassert>
@@ -127,6 +128,8 @@ int MCRegisterInfo::getCodeViewRegNum(unsigned RegNum) const {
report_fatal_error("target does not implement codeview register mapping");
const DenseMap<unsigned, int>::const_iterator I = L2CVRegs.find(RegNum);
if (I == L2CVRegs.end())
- report_fatal_error("unknown codeview register");
+ report_fatal_error("unknown codeview register " + (RegNum < getNumRegs()
+ ? getName(RegNum)
+ : Twine(RegNum)));
return I->second;
}
OpenPOWER on IntegriCloud