From 1b6e700a16d29fb45cf072cd3e2e81eba23ad35c Mon Sep 17 00:00:00 2001 From: Joe Abbey Date: Fri, 16 Nov 2012 19:38:42 +0000 Subject: [PATCH] Using const cast to alleviate a warning. A PR is being filed to address some code issues here. llvm-svn: 168185 --- lib/Target/PowerPC/PPCRegisterInfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp index 459c3589d3f..1f00b3b2b0d 100644 --- a/lib/Target/PowerPC/PPCRegisterInfo.cpp +++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp @@ -498,7 +498,8 @@ PPCRegisterInfo::hasReservedSpillSlot(const MachineFunction &MF, } else if (CRSpillFrameIdx) { FrameIdx = CRSpillFrameIdx; } else { - MachineFrameInfo *MFI = ((MachineFunction &)MF).getFrameInfo(); + MachineFrameInfo *MFI = + (const_cast(MF)).getFrameInfo(); FrameIdx = MFI->CreateFixedObject((uint64_t)4, (int64_t)-4, true); CRSpillFrameIdx = FrameIdx; }