Skip to content

Commit 7ae6c31

Browse files
committed
XtensaAsmPrinter: add a missing case for MBB
fixes an assertion failure: ``` Assertion failed: (ACPV->isExtSymbol() && "unrecognized constant pool value"), function emitMachineConstantPoolValue, file XtensaAsmPrinter.cpp, line 110. ``` observed with wamr-compiler.
1 parent 510a078 commit 7ae6c31

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Target/Xtensa/XtensaAsmPrinter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ void XtensaAsmPrinter::emitMachineConstantPoolValue(
103103
const BlockAddress *BA =
104104
cast<XtensaConstantPoolConstant>(ACPV)->getBlockAddress();
105105
MCSym = GetBlockAddressSymbol(BA);
106+
} else if (ACPV->isMachineBasicBlock()) {
107+
const MachineBasicBlock *MBB = cast<XtensaConstantPoolMBB>(ACPV)->getMBB();
108+
MCSym = MBB->getSymbol();
106109
} else if (ACPV->isJumpTable()) {
107110
unsigned Idx = cast<XtensaConstantPoolJumpTable>(ACPV)->getIndex();
108111
MCSym = this->GetJTISymbol(Idx, false);

0 commit comments

Comments
 (0)