summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-08-15 09:18:55 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-08-15 09:18:55 +0000
commit4922e2e8ef304cd79adbc556a889cdf5b2b0026f (patch)
tree1f373e5e4c7bffbd1d6bbda86afb2f0f2f9283d7 /llvm/lib
parentf58e8d3d0c654346c794b290cadc31e658479a29 (diff)
downloadbcm5719-llvm-4922e2e8ef304cd79adbc556a889cdf5b2b0026f.tar.gz
bcm5719-llvm-4922e2e8ef304cd79adbc556a889cdf5b2b0026f.zip
Make this compile on gc 3.4.1 (static_cast to non-const type was not
allowed). llvm-svn: 15766
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/PrologEpilogInserter.cpp4
-rw-r--r--llvm/lib/Target/PowerPC/PowerPCFrameInfo.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index 20442129650..1a07013ac30 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/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/llvm/lib/Target/PowerPC/PowerPCFrameInfo.h b/llvm/lib/Target/PowerPC/PowerPCFrameInfo.h
index ba6209fac5f..c72da9ad26a 100644
--- a/llvm/lib/Target/PowerPC/PowerPCFrameInfo.h
+++ b/llvm/lib/Target/PowerPC/PowerPCFrameInfo.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);
}
};
OpenPOWER on IntegriCloud