diff options
-rw-r--r-- | include/llvm/Target/TargetFrameInfo.h | 2 | ||||
-rw-r--r-- | lib/CodeGen/PrologEpilogInserter.cpp | 4 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCFrameInfo.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/Target/TargetFrameInfo.h b/include/llvm/Target/TargetFrameInfo.h index c727561ab2..dfdca8dab7 100644 --- a/include/llvm/Target/TargetFrameInfo.h +++ b/include/llvm/Target/TargetFrameInfo.h @@ -67,7 +67,7 @@ public: /// spilled at. If a register is not listed here, the code generator is /// allowed to spill it anywhere it chooses. /// - virtual std::pair<unsigned, int> * + virtual const std::pair<unsigned, int> * getCalleeSaveSpillSlots(unsigned &NumEntries) const { NumEntries = 0; return 0; diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index 2044212965..1a07013ac3 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -163,7 +163,7 @@ void PEI::calculateCallerSavedRegisters(MachineFunction &Fn) { return; // Early exit if no caller saved registers are modified! unsigned NumFixedSpillSlots; - std::pair<unsigned,int> *FixedSpillSlots = + const std::pair<unsigned,int> *FixedSpillSlots = TFI->getCalleeSaveSpillSlots(NumFixedSpillSlots); // Now that we know which registers need to be saved and restored, allocate @@ -175,7 +175,7 @@ void PEI::calculateCallerSavedRegisters(MachineFunction &Fn) { // Check to see if this physreg must be spilled to a particular stack slot // on this target. - std::pair<unsigned,int> *FixedSlot = FixedSpillSlots; + const std::pair<unsigned,int> *FixedSlot = FixedSpillSlots; while (FixedSlot != FixedSpillSlots+NumFixedSpillSlots && FixedSlot->first != Reg) ++FixedSlot; diff --git a/lib/Target/PowerPC/PPCFrameInfo.h b/lib/Target/PowerPC/PPCFrameInfo.h index ba6209fac5..c72da9ad26 100644 --- a/lib/Target/PowerPC/PPCFrameInfo.h +++ b/lib/Target/PowerPC/PPCFrameInfo.h @@ -33,10 +33,10 @@ public: LR[0].second = 8; } - std::pair<unsigned, int> * + const std::pair<unsigned, int> * getCalleeSaveSpillSlots(unsigned &NumEntries) const { NumEntries = 1; - return static_cast<std::pair<unsigned, int> *>(LR); + return static_cast<const std::pair<unsigned, int> *>(LR); } }; |