Remove a virtual function from TargetMachine. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2014-08-05 22:10:21 +00:00
parent b23c2d9b2c
commit 9920f561c3
6 changed files with 11 additions and 9 deletions

View File

@ -101,7 +101,7 @@ public:
virtual const TargetSubtargetInfo *getSubtargetImpl() const {
return nullptr;
}
virtual TargetSubtargetInfo *getSubtargetImpl() {
TargetSubtargetInfo *getSubtargetImpl() {
const TargetMachine *TM = this;
return const_cast<TargetSubtargetInfo *>(TM->getSubtargetImpl());
}

View File

@ -33,7 +33,6 @@ public:
bool isLittle);
const ARMSubtarget *getSubtargetImpl() const override { return &Subtarget; }
ARMSubtarget *getSubtargetImpl() override { return &Subtarget; }
/// \brief Register ARM analysis passes with a pass manager.
void addAnalysisPasses(PassManagerBase &PM) override;

View File

@ -44,10 +44,8 @@ public:
return Subtarget;
return &DefaultSubtarget;
}
MipsSubtarget *getSubtargetImpl() override {
if (Subtarget)
return Subtarget;
return &DefaultSubtarget;
MipsSubtarget *getSubtargetImpl() {
return static_cast<MipsSubtarget *>(TargetMachine::getSubtargetImpl());
}
/// \brief Reset the subtarget for the Mips target.

View File

@ -33,7 +33,6 @@ public:
CodeGenOpt::Level OL, bool is64Bit);
const PPCSubtarget *getSubtargetImpl() const override { return &Subtarget; }
PPCSubtarget *getSubtargetImpl() override { return &Subtarget; }
// Pass Pipeline Configuration
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;

View File

@ -29,7 +29,10 @@ public:
CodeGenOpt::Level OL, bool is64bit);
const SparcSubtarget *getSubtargetImpl() const override { return &Subtarget; }
SparcSubtarget *getSubtargetImpl() override { return &Subtarget; }
SparcSubtarget *getSubtargetImpl() {
return static_cast<SparcSubtarget *>(TargetMachine::getSubtargetImpl());
}
// Pass Pipeline Configuration
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;

View File

@ -32,7 +32,10 @@ public:
Reloc::Model RM, CodeModel::Model CM,
CodeGenOpt::Level OL);
const X86Subtarget *getSubtargetImpl() const override { return &Subtarget; }
X86Subtarget *getSubtargetImpl() override { return &Subtarget; }
X86Subtarget *getSubtargetImpl() {
return static_cast<X86Subtarget *>(TargetMachine::getSubtargetImpl());
}
/// \brief Register X86 analysis passes with a pass manager.
void addAnalysisPasses(PassManagerBase &PM) override;