This is in MCRegisterInfo, we can print the actual register name easily.
llvm-svn: 340089
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/Twine.h"
#include "llvm/Support/ErrorHandling.h"
#include <algorithm>
#include <cassert>
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;
}