Kill off <TARGET>MachineModule variables, and <TARGETASMPRINTER>ForceLink
authorDaniel Dunbar <daniel@zuster.org>
Thu, 16 Jul 2009 01:55:13 +0000 (01:55 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 16 Jul 2009 01:55:13 +0000 (01:55 +0000)
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

12 files changed:
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/CBackend/CBackend.cpp
lib/Target/CppBackend/CPPBackend.cpp
lib/Target/MSIL/MSILWriter.cpp
lib/Target/MSP430/MSP430TargetMachine.cpp
lib/Target/Mips/MipsTargetMachine.cpp
lib/Target/PIC16/PIC16TargetMachine.cpp
lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
lib/Target/PowerPC/PPCTargetMachine.cpp
lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
lib/Target/X86/X86TargetMachine.cpp
lib/Target/XCore/XCoreTargetMachine.cpp

index 519124416ba0516b8f5524d9302aa31f2ff0467c..a207871a5db6a16723a36dbe8bfcf49a48101257 100644 (file)
@@ -28,13 +28,6 @@ static cl::opt<bool> DisableLdStOpti("disable-arm-loadstore-opti", cl::Hidden,
 static cl::opt<bool> 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<ARMTargetMachine>   X(TheARMTarget, "arm",   "ARM");
index b1361e8c2680bef8e8933ed80afb3d2e7f65a8e0..cca896b59d3cf4f7b16c35119b0d0bc5c2c002ac 100644 (file)
 #include <sstream>
 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<CTargetMachine> X(TheCBackendTarget, "c", "C backend");
index 7b2995f9b024563f96b02fcd43b2d66b94ef23c6..08e1540c1e1e231d04f6d53b19ea3d7beaa6343b 100644 (file)
@@ -72,14 +72,6 @@ static cl::opt<std::string> 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<CPPTargetMachine> X(TheCppBackendTarget, "cpp", "C++ backend");
index bedf40385d5652d83d63ad950e1b64292fbff37f..8bd3c7bc22df918b98f0ff6700707b1211350602 100644 (file)
@@ -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<MSILTarget> X(TheMSILTarget, "msil", "MSIL backend");
 
index 603223b037189eb6e7c798ac673eed858baf143c..133a0acf28c0b1f714fc1c589cc14f3205873956 100644 (file)
 
 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<MSP430TargetMachine>
index 096c67d32478f4162fe6d7ad76d11214f7a07c9a..e29a96def436841079030190938f15d28d122fa1 100644 (file)
 #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<MipsTargetMachine>    X(TheMipsTarget, "mips", "Mips");
index 4c7ca8fbf66725949c0ff1df0ec018c333da2d7a..9f6266c672c0b0cfa7b0427b874771e4fcbc3bcf 100644 (file)
 
 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<PIC16TargetMachine> 
index b74321c6a9fd27623aed0c33d89e135efe9c74e4..19a1c47fe2cee1bd9b5ecd236cc8943669062d10 100644 (file)
@@ -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;
index 77b307242059c780923f635d0e1261e1cbf2737c..f56167e39018909991dc3d47d250b5329255c9a9 100644 (file)
 #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<PPC32TargetMachine>
index d2bab78cb8301b490829ebeb84e7cb785137f46a..adb242882a0af5aa0828c3b0b219ec1f14227a87 100644 (file)
@@ -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;
index 43fbbc07e89ed8b481a7aa46ead42cbf010765d9..29f38a38597888c721ffd30806f11626823e2255 100644 (file)
 #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<X86_32TargetMachine>
index 776683dde557666ca24729bee20cb2190552e011..83a870f64f1255365206761c006baff86d35c6af 100644 (file)
 #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.