Target: Fix build breakage.

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218497 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Majnemer 2014-09-26 02:57:05 +00:00
parent 346056ffc0
commit af100b0350
2 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@ public:
virtual const TargetSubtargetInfo *getSubtargetImpl() const {
return nullptr;
}
virtual const TargetSubtargetInfo *getSubtargetImpl(const Function *) const {
virtual const TargetSubtargetInfo *getSubtargetImpl(const Function &) const {
return getSubtargetImpl();
}

View File

@ -85,7 +85,7 @@ MipselTargetMachine(const Target &T, StringRef TT,
: MipsTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, true) {}
const MipsSubtarget *
MipsTargetMachine::getSubtargetImpl(const Function &F) const override {
MipsTargetMachine::getSubtargetImpl(const Function &F) const {
AttributeSet FnAttrs = F.getAttributes();
Attribute CPUAttr =
FnAttrs.getAttribute(AttributeSet::FunctionIndex, "target-cpu");
@ -124,7 +124,7 @@ MipsTargetMachine::getSubtargetImpl(const Function &F) const override {
void MipsTargetMachine::resetSubtarget(MachineFunction *MF) {
DEBUG(dbgs() << "resetSubtarget\n");
Subtarget = const_cast<MipsSubtarget*>(getSubtargetImpl(MF->getFunction()));
Subtarget = const_cast<MipsSubtarget *>(getSubtargetImpl(*MF->getFunction()));
MF->setSubtarget(Subtarget);
return;
}