Skip to content

Commit 7760ae7

Browse files
authored
[X86] Switch to the new symbol visibility macros (#109982)
Switch LLVMInitialize* functions to new the symbol visibility macros that will work for windows. This is part of the work to enable LLVM_BUILD_LLVM_DYLIB and plugins on windows.
1 parent bc7e099 commit 7760ae7

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5031,7 +5031,7 @@ bool X86AsmParser::parseDirectiveSEHPushFrame(SMLoc Loc) {
50315031
}
50325032

50335033
// Force static initialization.
5034-
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86AsmParser() {
5034+
extern "C" LLVM_C_ABI void LLVMInitializeX86AsmParser() {
50355035
RegisterMCAsmParser<X86AsmParser> X(getTheX86_32Target());
50365036
RegisterMCAsmParser<X86AsmParser> Y(getTheX86_64Target());
50375037
}

llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2479,7 +2479,7 @@ static MCDisassembler *createX86Disassembler(const Target &T,
24792479
return new X86GenericDisassembler(STI, Ctx, std::move(MII));
24802480
}
24812481

2482-
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86Disassembler() {
2482+
extern "C" LLVM_C_ABI void LLVMInitializeX86Disassembler() {
24832483
// Register the disassembler.
24842484
TargetRegistry::RegisterMCDisassembler(getTheX86_32Target(),
24852485
createX86Disassembler);

llvm/lib/Target/X86/MCA/X86CustomBehaviour.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static InstrPostProcess *createX86InstrPostProcess(const MCSubtargetInfo &STI,
5656

5757
/// Extern function to initialize the targets for the X86 backend
5858

59-
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86TargetMCA() {
59+
extern "C" LLVM_C_ABI void LLVMInitializeX86TargetMCA() {
6060
TargetRegistry::RegisterInstrPostProcess(getTheX86_32Target(),
6161
createX86InstrPostProcess);
6262
TargetRegistry::RegisterInstrPostProcess(getTheX86_64Target(),

llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ static MCInstrAnalysis *createX86MCInstrAnalysis(const MCInstrInfo *Info) {
710710
}
711711

712712
// Force static initialization.
713-
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86TargetMC() {
713+
extern "C" LLVM_C_ABI void LLVMInitializeX86TargetMC() {
714714
for (Target *T : {&getTheX86_32Target(), &getTheX86_64Target()}) {
715715
// Register the MC asm info.
716716
RegisterMCAsmInfoFn X(*T, createX86MCAsmInfo);

llvm/lib/Target/X86/TargetInfo/X86TargetInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Target &llvm::getTheX86_64Target() {
1919
return TheX86_64Target;
2020
}
2121

22-
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86TargetInfo() {
22+
extern "C" LLVM_C_ABI void LLVMInitializeX86TargetInfo() {
2323
RegisterTarget<Triple::x86, /*HasJIT=*/true> X(
2424
getTheX86_32Target(), "x86", "32-bit X86: Pentium-Pro and above", "X86");
2525

llvm/lib/Target/X86/X86AsmPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ void X86AsmPrinter::emitEndOfAsmFile(Module &M) {
10671067
//===----------------------------------------------------------------------===//
10681068

10691069
// Force static initialization.
1070-
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86AsmPrinter() {
1070+
extern "C" LLVM_C_ABI void LLVMInitializeX86AsmPrinter() {
10711071
RegisterAsmPrinter<X86AsmPrinter> X(getTheX86_32Target());
10721072
RegisterAsmPrinter<X86AsmPrinter> Y(getTheX86_64Target());
10731073
}

llvm/lib/Target/X86/X86TargetMachine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static cl::opt<bool>
6565
cl::desc("Enable the tile register allocation pass"),
6666
cl::init(true), cl::Hidden);
6767

68-
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86Target() {
68+
extern "C" LLVM_C_ABI void LLVMInitializeX86Target() {
6969
// Register the target.
7070
RegisterTargetMachine<X86TargetMachine> X(getTheX86_32Target());
7171
RegisterTargetMachine<X86TargetMachine> Y(getTheX86_64Target());

0 commit comments

Comments
 (0)