Skip to content
Merged
6 changes: 5 additions & 1 deletion llvm/lib/Target/X86/X86MCInstLower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,12 @@ MCOperand X86MCInstLower::LowerMachineOperand(const MachineInstr *MI,
return MCOperand::createImm(MO.getImm());
case MachineOperand::MO_MachineBasicBlock:
case MachineOperand::MO_GlobalAddress:
case MachineOperand::MO_ExternalSymbol:
return LowerSymbolOperand(MO, GetSymbolFromOperand(MO));
case MachineOperand::MO_ExternalSymbol: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean for MO_GlobalAddress and MO_MachineBasicBlock to also hit this branch?

Copy link
Contributor Author

@weiweichen weiweichen Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

welp, no, 🤦‍♀️, thanks for pointing this out!

MCSymbol *Sym = GetSymbolFromOperand(MO);
Sym->setExternal(true);
return LowerSymbolOperand(MO, Sym);
}
case MachineOperand::MO_MCSymbol:
return LowerSymbolOperand(MO, MO.getMCSymbol());
case MachineOperand::MO_JumpTableIndex:
Expand Down
Loading