From e78085a3c03de648a481e9751c3094c517bd7123 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 22 Jul 2011 21:58:54 +0000 Subject: Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo, InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135812 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp | 37 ++++++++++------------ 1 file changed, 17 insertions(+), 20 deletions(-) (limited to 'lib/Target/SystemZ') diff --git a/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp b/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp index 57c3917..fc73216 100644 --- a/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp +++ b/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp @@ -35,22 +35,12 @@ static MCInstrInfo *createSystemZMCInstrInfo() { return X; } -extern "C" void LLVMInitializeSystemZMCInstrInfo() { - TargetRegistry::RegisterMCInstrInfo(TheSystemZTarget, - createSystemZMCInstrInfo); -} - static MCRegisterInfo *createSystemZMCRegisterInfo(StringRef TT) { MCRegisterInfo *X = new MCRegisterInfo(); InitSystemZMCRegisterInfo(X, 0); return X; } -extern "C" void LLVMInitializeSystemZMCRegisterInfo() { - TargetRegistry::RegisterMCRegInfo(TheSystemZTarget, - createSystemZMCRegisterInfo); -} - static MCSubtargetInfo *createSystemZMCSubtargetInfo(StringRef TT, StringRef CPU, StringRef FS) { @@ -59,15 +49,6 @@ static MCSubtargetInfo *createSystemZMCSubtargetInfo(StringRef TT, return X; } -extern "C" void LLVMInitializeSystemZMCSubtargetInfo() { - TargetRegistry::RegisterMCSubtargetInfo(TheSystemZTarget, - createSystemZMCSubtargetInfo); -} - -extern "C" void LLVMInitializeSystemZMCAsmInfo() { - RegisterMCAsmInfo X(TheSystemZTarget); -} - MCCodeGenInfo *createSystemZMCCodeGenInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM) { MCCodeGenInfo *X = new MCCodeGenInfo(); @@ -77,7 +58,23 @@ MCCodeGenInfo *createSystemZMCCodeGenInfo(StringRef TT, Reloc::Model RM, return X; } -extern "C" void LLVMInitializeSystemZMCCodeGenInfo() { +extern "C" void LLVMInitializeSystemZTargetMC() { + // Register the MC asm info. + RegisterMCAsmInfo X(TheSystemZTarget); + + // Register the MC codegen info. TargetRegistry::RegisterMCCodeGenInfo(TheSystemZTarget, createSystemZMCCodeGenInfo); + + // Register the MC instruction info. + TargetRegistry::RegisterMCInstrInfo(TheSystemZTarget, + createSystemZMCInstrInfo); + + // Register the MC register info. + TargetRegistry::RegisterMCRegInfo(TheSystemZTarget, + createSystemZMCRegisterInfo); + + // Register the MC subtarget info. + TargetRegistry::RegisterMCSubtargetInfo(TheSystemZTarget, + createSystemZMCSubtargetInfo); } -- cgit v1.1