From 2f25120f35279e2a7a437a4e6dda017b59caea88 Mon Sep 17 00:00:00 2001 From: Darren Date: Fri, 11 Apr 2014 15:24:24 -0400 Subject: [PATCH] [VER 3] replace llvm_unreachable call with emitError in SIInstrInfo::copyPhysReg --- lib/Target/R600/SIInstrInfo.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Target/R600/SIInstrInfo.cpp b/lib/Target/R600/SIInstrInfo.cpp index b19ff98..10fc7d7 100644 --- a/lib/Target/R600/SIInstrInfo.cpp +++ b/lib/Target/R600/SIInstrInfo.cpp @@ -19,6 +19,8 @@ #include "SIMachineFunctionInfo.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/IR/Function.h" +#include "llvm/IR/LLVMContext.h" #include "llvm/MC/MCInstrDesc.h" using namespace llvm; @@ -153,7 +155,10 @@ SIInstrInfo::copyPhysReg(MachineBasicBlock &MBB, SubIndices = Sub0_15; } else { - llvm_unreachable("Can't copy register!"); + const MachineFunction *MF = MBB.getParent(); + LLVMContext &Ctx = MF->getFunction()->getContext(); + + Ctx.emitError("SIInstrInfo::copyPhysReg - Can't copy register!"); } while (unsigned SubIdx = *SubIndices++) { -- 1.8.3.2