diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-25 06:49:55 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-25 06:49:55 +0000 |
commit | 0c795d61878156817cedbac51ec2921f2634c1a5 (patch) | |
tree | 368d6bec69dc60fd9d6fcf8201a1a76500a7546f /lib/Target/MSIL/MSILWriter.cpp | |
parent | 92ccf70ad448eb02f9f273d2c70ae4708b3bd0f2 (diff) |
Add new helpers for registering targets.
- Less boilerplate == good.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSIL/MSILWriter.cpp')
-rw-r--r-- | lib/Target/MSIL/MSILWriter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/MSIL/MSILWriter.cpp b/lib/Target/MSIL/MSILWriter.cpp index c3808d379e..ccac5189f3 100644 --- a/lib/Target/MSIL/MSILWriter.cpp +++ b/lib/Target/MSIL/MSILWriter.cpp @@ -22,6 +22,7 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Support/MathExtras.h" +#include "llvm/Target/TargetRegistry.h" #include "llvm/Transforms/Scalar.h" #include "llvm/ADT/StringExtras.h" #include "llvm/CodeGen/Passes.h" @@ -48,10 +49,10 @@ namespace { }; } -static RegisterTarget<MSILTarget> X(TheMSILTarget, "msil", "MSIL backend"); - -// Force static initialization. -extern "C" void LLVMInitializeMSILTarget() { } +extern "C" void LLVMInitializeMSILTarget() { + // Register the target. + RegisterTargetMachine<MSILTarget> X(TheMSILTarget); +} bool MSILModule::runOnModule(Module &M) { ModulePtr = &M; |