Fix PR14364.
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Sun, 24 Feb 2013 17:34:50 +0000 (17:34 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Sun, 24 Feb 2013 17:34:50 +0000 (17:34 +0000)
commit4edd84da1b3f7fd73e96a13b6b7e183ad04ac7c4
tree8df3f923389a8b9af3aaa8ae3e6c5367fd9fa221
parente8aa36a4afa02dde89e10f39b6ca87cfe1949dd8
Fix PR14364.

This removes a const_cast hack from PPCRegisterInfo::hasReservedSpillSlot().
The proper place to save the frame index for the CR spill slot is in the
PPCFunctionInfo object, not the PPCRegisterInfo object.

No new test cases, as this just reimplements existing function.  Existing
tests such as test/CodeGen/PowerPC/crsave.ll are sufficient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175998 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCFrameLowering.cpp
lib/Target/PowerPC/PPCMachineFunctionInfo.h
lib/Target/PowerPC/PPCRegisterInfo.cpp
lib/Target/PowerPC/PPCRegisterInfo.h