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
This commit is contained in:
Daniel Dunbar
2009-07-25 06:49:55 +00:00
parent 92ccf70ad4
commit 0c795d6187
40 changed files with 188 additions and 344 deletions
+4 -11
View File
@@ -1,4 +1,4 @@
//===-- SystemZTargetMachine.cpp - Define TargetMachine for SystemZ -----------===//
//===-- SystemZTargetMachine.cpp - Define TargetMachine for SystemZ -------===//
//
// The LLVM Compiler Infrastructure
//
@@ -15,19 +15,12 @@
#include "SystemZ.h"
#include "llvm/Module.h"
#include "llvm/PassManager.h"
#include "llvm/Target/TargetMachineRegistry.h"
#include "llvm/Target/TargetRegistry.h"
using namespace llvm;
namespace {
// Register the target.
RegisterTarget<SystemZTargetMachine> X(TheSystemZTarget,
"systemz",
"SystemZ [experimental]");
}
// Force static initialization.
extern "C" void LLVMInitializeSystemZTarget() {
// Register the target.
RegisterTargetMachine<SystemZTargetMachine> X(TheSystemZTarget);
}
const TargetAsmInfo *SystemZTargetMachine::createTargetAsmInfo() const {