Skip to content

Commit 4dc4f82

Browse files
committed
[llvm] Handle CPI symbols for UEFI
UEFI targets besides MSVC environment must support constant pool symbols.
1 parent 052a4b5 commit 4dc4f82

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4096,7 +4096,8 @@ const MCExpr *AsmPrinter::lowerBlockAddressConstant(const BlockAddress &BA) {
40964096

40974097
/// GetCPISymbol - Return the symbol for the specified constant pool entry.
40984098
MCSymbol *AsmPrinter::GetCPISymbol(unsigned CPID) const {
4099-
if (getSubtargetInfo().getTargetTriple().isWindowsMSVCEnvironment()) {
4099+
if (getSubtargetInfo().getTargetTriple().isWindowsMSVCEnvironment() ||
4100+
getSubtargetInfo().getTargetTriple().isUEFI()) {
41004101
const MachineConstantPoolEntry &CPE =
41014102
MF->getConstantPool()->getConstants()[CPID];
41024103
if (!CPE.isMachineConstantPoolEntry()) {

0 commit comments

Comments
 (0)