mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
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:
@@ -15,20 +15,8 @@
|
||||
#include "XCore.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/PassManager.h"
|
||||
#include "llvm/Target/TargetMachineRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
// Register the target.
|
||||
RegisterTarget<XCoreTargetMachine> X(TheXCoreTarget, "xcore", "XCore");
|
||||
}
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializeXCoreTarget() {
|
||||
TargetRegistry::RegisterAsmPrinter(TheXCoreTarget,
|
||||
&createXCoreCodePrinterPass);
|
||||
}
|
||||
|
||||
const TargetAsmInfo *XCoreTargetMachine::createTargetAsmInfo() const {
|
||||
return new XCoreTargetAsmInfo(*this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user