Author: Eli Friedman Date: 2025-03-28T00:53:06Z New Revision: 2406e0d4467a265678f4e414f23a88faf5012944
URL: https://github.com/llvm/llvm-project/commit/2406e0d4467a265678f4e414f23a88faf5012944 DIFF: https://github.com/llvm/llvm-project/commit/2406e0d4467a265678f4e414f23a88faf5012944.diff LOG: Revert "[MC] Explicitly mark MCSymbol for MO_ExternalSymbol" (#133291) Reverts llvm/llvm-project#108880 . The patch has no regression test, no description of why the fix is necessary, and the code is modifying MC datastructures in a way that's forbidden in the AsmPrinter. Fixes #132055. (cherry picked from commit cd6e959102888279dc7e75a41ebd75a08ac3f7a5) Added: Modified: llvm/lib/Target/X86/X86MCInstLower.cpp Removed: ################################################################################ diff --git a/llvm/lib/Target/X86/X86MCInstLower.cpp b/llvm/lib/Target/X86/X86MCInstLower.cpp index 645a9baeba65c..680bf4286da0c 100644 --- a/llvm/lib/Target/X86/X86MCInstLower.cpp +++ b/llvm/lib/Target/X86/X86MCInstLower.cpp @@ -348,12 +348,8 @@ 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: { - MCSymbol *Sym = GetSymbolFromOperand(MO); - Sym->setExternal(true); - return LowerSymbolOperand(MO, Sym); - } case MachineOperand::MO_MCSymbol: return LowerSymbolOperand(MO, MO.getMCSymbol()); case MachineOperand::MO_JumpTableIndex: _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits