Skip to content

Commit a9827fb

Browse files
authored
[llvm] Handle CPI symbols for UEFI (#135652)
UEFI targets besides MSVC environment must support constant pool symbols.
1 parent 2afef58 commit a9827fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -4113,7 +4113,8 @@ const MCExpr *AsmPrinter::lowerBlockAddressConstant(const BlockAddress &BA) {
41134113

41144114
/// GetCPISymbol - Return the symbol for the specified constant pool entry.
41154115
MCSymbol *AsmPrinter::GetCPISymbol(unsigned CPID) const {
4116-
if (getSubtargetInfo().getTargetTriple().isWindowsMSVCEnvironment()) {
4116+
if (getSubtargetInfo().getTargetTriple().isWindowsMSVCEnvironment() ||
4117+
getSubtargetInfo().getTargetTriple().isUEFI()) {
41174118
const MachineConstantPoolEntry &CPE =
41184119
MF->getConstantPool()->getConstants()[CPID];
41194120
if (!CPE.isMachineConstantPoolEntry()) {

0 commit comments

Comments
 (0)