diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-30 18:25:11 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-30 18:25:11 +0000 |
commit | d86e8bb0ed5aefa6b18ffab88b8d542c95f52052 (patch) | |
tree | 94535e80931212ff5df25ef80ac53b8fb4bd6033 /llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp | |
parent | 8b08d2c5c87bbb0cca4ee59987499f73e252068b (diff) | |
download | bcm5719-llvm-d86e8bb0ed5aefa6b18ffab88b8d542c95f52052.tar.gz bcm5719-llvm-d86e8bb0ed5aefa6b18ffab88b8d542c95f52052.zip |
Delete MCCodeGenInfo.
MC doesn't really care about CodeGen stuff, so this was just
complicating target initialization.
llvm-svn: 274258
Diffstat (limited to 'llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp index d3031c686aa..c9074448fe4 100644 --- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp +++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp @@ -15,7 +15,6 @@ #include "InstPrinter/PPCInstPrinter.h" #include "PPCMCAsmInfo.h" #include "PPCTargetStreamer.h" -#include "llvm/MC/MCCodeGenInfo.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCELFStreamer.h" #include "llvm/MC/MCExpr.h" @@ -87,18 +86,13 @@ static MCAsmInfo *createPPCMCAsmInfo(const MCRegisterInfo &MRI, return MAI; } -static MCCodeGenInfo *createPPCMCCodeGenInfo(const Triple &TT, Reloc::Model RM, - CodeModel::Model CM, - CodeGenOpt::Level OL) { - MCCodeGenInfo *X = new MCCodeGenInfo(); - +static void adjustCodeGenOpts(const Triple &TT, Reloc::Model RM, + CodeModel::Model &CM) { if (CM == CodeModel::Default) { if (!TT.isOSDarwin() && (TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le)) CM = CodeModel::Medium; } - X->initMCCodeGenInfo(RM, CM, OL); - return X; } namespace { @@ -239,7 +233,7 @@ extern "C" void LLVMInitializePowerPCTargetMC() { RegisterMCAsmInfoFn C(*T, createPPCMCAsmInfo); // Register the MC codegen info. - TargetRegistry::RegisterMCCodeGenInfo(*T, createPPCMCCodeGenInfo); + TargetRegistry::registerMCAdjustCodeGenOpts(*T, adjustCodeGenOpts); // Register the MC instruction info. TargetRegistry::RegisterMCInstrInfo(*T, createPPCMCInstrInfo); |