Using const cast to alleviate a warning.

A PR is being filed to address some code issues here.

llvm-svn: 168185
This commit is contained in:
Joe Abbey 2012-11-16 19:38:42 +00:00
parent f0854b070a
commit cceda898b8
1 changed files with 2 additions and 1 deletions

View File

@ -498,7 +498,8 @@ PPCRegisterInfo::hasReservedSpillSlot(const MachineFunction &MF,
} else if (CRSpillFrameIdx) {
FrameIdx = CRSpillFrameIdx;
} else {
MachineFrameInfo *MFI = ((MachineFunction &)MF).getFrameInfo();
MachineFrameInfo *MFI =
(const_cast<MachineFunction &>(MF)).getFrameInfo();
FrameIdx = MFI->CreateFixedObject((uint64_t)4, (int64_t)-4, true);
CRSpillFrameIdx = FrameIdx;
}