Be const correct
authorChris Lattner <sabre@nondot.org>
Sat, 26 Jul 2003 23:23:41 +0000 (23:23 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 26 Jul 2003 23:23:41 +0000 (23:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7348 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/InstrSched/InstrScheduling.cpp
lib/Target/SparcV9/InstrSched/InstrScheduling.cpp

index 6cc271a7d30af88b5c720b1141c4e56e6eb7ce7c..e8778220cbaa87692d47f1532977d1e941c8d01a 100644 (file)
@@ -1197,9 +1197,9 @@ static void ReplaceNopsWithUsefulInstr(SchedulingManager& S,
         nopNodeVec.push_back(graph->getGraphNodeForInstr(MBB[i]));
          
         //remove the MI from the Machine Code For Instruction
-        TerminatorInst *TI = MBB.getBasicBlock()->getTerminator();
+        const TerminatorInst *TI = MBB.getBasicBlock()->getTerminator();
         MachineCodeForInstruction& llvmMvec = 
-          MachineCodeForInstruction::get((Instruction *)TI);
+          MachineCodeForInstruction::get((const Instruction *)TI);
           
         for(MachineCodeForInstruction::iterator mciI=llvmMvec.begin(), 
               mciE=llvmMvec.end(); mciI!=mciE; ++mciI){
index 6cc271a7d30af88b5c720b1141c4e56e6eb7ce7c..e8778220cbaa87692d47f1532977d1e941c8d01a 100644 (file)
@@ -1197,9 +1197,9 @@ static void ReplaceNopsWithUsefulInstr(SchedulingManager& S,
         nopNodeVec.push_back(graph->getGraphNodeForInstr(MBB[i]));
          
         //remove the MI from the Machine Code For Instruction
-        TerminatorInst *TI = MBB.getBasicBlock()->getTerminator();
+        const TerminatorInst *TI = MBB.getBasicBlock()->getTerminator();
         MachineCodeForInstruction& llvmMvec = 
-          MachineCodeForInstruction::get((Instruction *)TI);
+          MachineCodeForInstruction::get((const Instruction *)TI);
           
         for(MachineCodeForInstruction::iterator mciI=llvmMvec.begin(), 
               mciE=llvmMvec.end(); mciI!=mciE; ++mciI){