mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +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:
@@ -16,20 +16,16 @@
|
||||
#include "PPCTargetMachine.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/PassManager.h"
|
||||
#include "llvm/Target/TargetMachineRegistry.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
#include "llvm/Support/FormattedStream.h"
|
||||
using namespace llvm;
|
||||
|
||||
// Register the targets
|
||||
static RegisterTarget<PPC32TargetMachine>
|
||||
X(ThePPC32Target, "ppc32", "PowerPC 32");
|
||||
|
||||
static RegisterTarget<PPC64TargetMachine>
|
||||
Y(ThePPC64Target, "ppc64", "PowerPC 64");
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializePowerPCTarget() { }
|
||||
extern "C" void LLVMInitializePowerPCTarget() {
|
||||
// Register the targets
|
||||
RegisterTargetMachine<PPC32TargetMachine> A(ThePPC32Target);
|
||||
RegisterTargetMachine<PPC64TargetMachine> B(ThePPC64Target);
|
||||
}
|
||||
|
||||
const TargetAsmInfo *PPCTargetMachine::createTargetAsmInfo() const {
|
||||
if (Subtarget.isDarwin())
|
||||
|
||||
Reference in New Issue
Block a user