From 64cc97212346992892b6c92158c08cd93149a882 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 16 Jul 2009 01:55:13 +0000 Subject: [PATCH] Kill off MachineModule variables, and ForceLink variables. - Module initialization functions supplanted the need for these. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75886 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMTargetMachine.cpp | 7 ------- lib/Target/CBackend/CBackend.cpp | 8 -------- lib/Target/CppBackend/CPPBackend.cpp | 8 -------- lib/Target/MSIL/MSILWriter.cpp | 8 -------- lib/Target/MSP430/MSP430TargetMachine.cpp | 9 --------- lib/Target/Mips/MipsTargetMachine.cpp | 8 -------- lib/Target/PIC16/PIC16TargetMachine.cpp | 9 --------- lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 3 --- lib/Target/PowerPC/PPCTargetMachine.cpp | 8 -------- lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp | 3 --- lib/Target/X86/X86TargetMachine.cpp | 7 ------- lib/Target/XCore/XCoreTargetMachine.cpp | 8 -------- 12 files changed, 86 deletions(-) diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp index 519124416ba..a207871a5db 100644 --- a/lib/Target/ARM/ARMTargetMachine.cpp +++ b/lib/Target/ARM/ARMTargetMachine.cpp @@ -28,13 +28,6 @@ static cl::opt DisableLdStOpti("disable-arm-loadstore-opti", cl::Hidden, static cl::opt DisableIfConversion("disable-arm-if-conversion",cl::Hidden, cl::desc("Disable if-conversion pass")); -/// ARMTargetMachineModule - Note that this is used on hosts that cannot link -/// in a library unless there are references into the library. In particular, -/// it seems that it is not possible to get things to work on Win32 without -/// this. Though it is unused, do not remove it. -extern "C" int ARMTargetMachineModule; -int ARMTargetMachineModule = 0; - // Register the target. extern Target TheARMTarget; static RegisterTarget X(TheARMTarget, "arm", "ARM"); diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index b1361e8c268..cca896b59d3 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -50,14 +50,6 @@ #include using namespace llvm; -/// CBackendTargetMachineModule - Note that this is used on hosts that -/// cannot link in a library unless there are references into the -/// library. In particular, it seems that it is not possible to get -/// things to work on Win32 without this. Though it is unused, do not -/// remove it. -extern "C" int CBackendTargetMachineModule; -int CBackendTargetMachineModule = 0; - // Register the target. extern Target TheCBackendTarget; static RegisterTarget X(TheCBackendTarget, "c", "C backend"); diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index 7b2995f9b02..08e1540c1e1 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -72,14 +72,6 @@ static cl::opt NameToGenerate("cppfor", cl::Optional, cl::desc("Specify the name of the thing to generate"), cl::init("!bad!")); -/// CppBackendTargetMachineModule - Note that this is used on hosts -/// that cannot link in a library unless there are references into the -/// library. In particular, it seems that it is not possible to get -/// things to work on Win32 without this. Though it is unused, do not -/// remove it. -extern "C" int CppBackendTargetMachineModule; -int CppBackendTargetMachineModule = 0; - // Register the target. extern Target TheCppBackendTarget; static RegisterTarget X(TheCppBackendTarget, "cpp", "C++ backend"); diff --git a/lib/Target/MSIL/MSILWriter.cpp b/lib/Target/MSIL/MSILWriter.cpp index bedf40385d5..8bd3c7bc22d 100644 --- a/lib/Target/MSIL/MSILWriter.cpp +++ b/lib/Target/MSIL/MSILWriter.cpp @@ -47,14 +47,6 @@ namespace { }; } -/// MSILTargetMachineModule - Note that this is used on hosts that -/// cannot link in a library unless there are references into the -/// library. In particular, it seems that it is not possible to get -/// things to work on Win32 without this. Though it is unused, do not -/// remove it. -extern "C" int MSILTargetMachineModule; -int MSILTargetMachineModule = 0; - extern Target TheMSILTarget; static RegisterTarget X(TheMSILTarget, "msil", "MSIL backend"); diff --git a/lib/Target/MSP430/MSP430TargetMachine.cpp b/lib/Target/MSP430/MSP430TargetMachine.cpp index 603223b0371..133a0acf28c 100644 --- a/lib/Target/MSP430/MSP430TargetMachine.cpp +++ b/lib/Target/MSP430/MSP430TargetMachine.cpp @@ -22,15 +22,6 @@ using namespace llvm; -/// MSP430TargetMachineModule - Note that this is used on hosts that -/// cannot link in a library unless there are references into the -/// library. In particular, it seems that it is not possible to get -/// things to work on Win32 without this. Though it is unused, do not -/// remove it. -extern "C" int MSP430TargetMachineModule; -int MSP430TargetMachineModule = 0; - - // Register the targets extern Target TheMSP430Target; static RegisterTarget diff --git a/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp index 096c67d3247..e29a96def43 100644 --- a/lib/Target/Mips/MipsTargetMachine.cpp +++ b/lib/Target/Mips/MipsTargetMachine.cpp @@ -19,14 +19,6 @@ #include "llvm/Target/TargetMachineRegistry.h" using namespace llvm; -/// MipsTargetMachineModule - Note that this is used on hosts that -/// cannot link in a library unless there are references into the -/// library. In particular, it seems that it is not possible to get -/// things to work on Win32 without this. Though it is unused, do not -/// remove it. -extern "C" int MipsTargetMachineModule; -int MipsTargetMachineModule = 0; - // Register the target. extern Target TheMipsTarget; static RegisterTarget X(TheMipsTarget, "mips", "Mips"); diff --git a/lib/Target/PIC16/PIC16TargetMachine.cpp b/lib/Target/PIC16/PIC16TargetMachine.cpp index 4c7ca8fbf66..9f6266c672c 100644 --- a/lib/Target/PIC16/PIC16TargetMachine.cpp +++ b/lib/Target/PIC16/PIC16TargetMachine.cpp @@ -22,15 +22,6 @@ using namespace llvm; -/// PIC16TargetMachineModule - Note that this is used on hosts that -/// cannot link in a library unless there are references into the -/// library. In particular, it seems that it is not possible to get -/// things to work on Win32 without this. Though it is unused, do not -/// remove it. -extern "C" int PIC16TargetMachineModule; -int PIC16TargetMachineModule = 0; - - // Register the targets extern Target ThePIC16Target; static RegisterTarget diff --git a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp index b74321c6a9f..19a1c47fe2c 100644 --- a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp @@ -1093,9 +1093,6 @@ FunctionPass *llvm::createPPCAsmPrinterPass(formatted_raw_ostream &o, } } -extern "C" int PowerPCAsmPrinterForceLink; -int PowerPCAsmPrinterForceLink = 0; - // Force static initialization. extern "C" void LLVMInitializePowerPCAsmPrinter() { extern Target ThePPC32Target; diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index 77b30724205..f56167e3901 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -21,14 +21,6 @@ #include "llvm/Support/FormattedStream.h" using namespace llvm; -/// PowerPCTargetMachineModule - Note that this is used on hosts that -/// cannot link in a library unless there are references into the -/// library. In particular, it seems that it is not possible to get -/// things to work on Win32 without this. Though it is unused, do not -/// remove it. -extern "C" int PowerPCTargetMachineModule; -int PowerPCTargetMachineModule = 0; - // Register the targets extern Target ThePPC32Target; static RegisterTarget diff --git a/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp index d2bab78cb83..adb242882a0 100644 --- a/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp @@ -34,9 +34,6 @@ FunctionPass *llvm::createX86CodePrinterPass(formatted_raw_ostream &o, return new X86ATTAsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose); } -extern "C" int X86AsmPrinterForceLink; -int X86AsmPrinterForceLink = 0; - // Force static initialization. extern "C" void LLVMInitializeX86AsmPrinter() { extern Target TheX86_32Target; diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 43fbbc07e89..29f38a38597 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -23,13 +23,6 @@ #include "llvm/Target/TargetMachineRegistry.h" using namespace llvm; -/// X86TargetMachineModule - Note that this is used on hosts that cannot link -/// in a library unless there are references into the library. In particular, -/// it seems that it is not possible to get things to work on Win32 without -/// this. Though it is unused, do not remove it. -extern "C" int X86TargetMachineModule; -int X86TargetMachineModule = 0; - // Register the target. extern Target TheX86_32Target; static RegisterTarget diff --git a/lib/Target/XCore/XCoreTargetMachine.cpp b/lib/Target/XCore/XCoreTargetMachine.cpp index 776683dde55..83a870f64f1 100644 --- a/lib/Target/XCore/XCoreTargetMachine.cpp +++ b/lib/Target/XCore/XCoreTargetMachine.cpp @@ -18,14 +18,6 @@ #include "llvm/Target/TargetMachineRegistry.h" using namespace llvm; -/// XCoreTargetMachineModule - Note that this is used on hosts that -/// cannot link in a library unless there are references into the -/// library. In particular, it seems that it is not possible to get -/// things to work on Win32 without this. Though it is unused, do not -/// remove it. -extern "C" int XCoreTargetMachineModule; -int XCoreTargetMachineModule = 0; - extern Target TheXCoreTarget; namespace { // Register the target. -- 2.34.1