diff options
-rw-r--r-- | lib/Target/ARM/ARMAsmPrinter.cpp | 3 | ||||
-rw-r--r-- | lib/Target/ARM/ARMBaseInstrInfo.cpp | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index fe8a65e700..f5d5248d36 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -853,6 +853,9 @@ EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) { } else if (ACPV->isGlobalValue()) { const GlobalValue *GV = ACPV->getGV(); MCSym = GetARMGVSymbol(GV); + } else if (ACPV->isMachineBasicBlock()) { + const MachineBasicBlock *MBB = ACPV->getMBB(); + MCSym = MBB->getSymbol(); } else { assert(ACPV->isExtSymbol() && "unrecognized constant pool value"); MCSym = GetExternalSymbolSymbol(ACPV->getSymbol()); diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index 3083097435..ffa9958592 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -1065,6 +1065,10 @@ static unsigned duplicateCPV(MachineFunction &MF, unsigned &CPI) { else if (ACPV->isLSDA()) NewCPV = new ARMConstantPoolValue(MF.getFunction(), PCLabelId, ARMCP::CPLSDA, 4); + else if (ACPV->isMachineBasicBlock()) + NewCPV = new ARMConstantPoolValue(MF.getFunction()->getContext(), + ACPV->getMBB(), PCLabelId, + ARMCP::CPMachineBasicBlock, 4); else llvm_unreachable("Unexpected ARM constantpool value type!!"); CPI = MCP->getConstantPoolIndex(NewCPV, MCPE.getAlignment()); |