Make Print callable from a pass's print method: add const qualifier. No
authorTorok Edwin <edwintorok@gmail.com>
Wed, 11 Mar 2009 20:50:17 +0000 (20:50 +0000)
committerTorok Edwin <edwintorok@gmail.com>
Wed, 11 Mar 2009 20:50:17 +0000 (20:50 +0000)
functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66700 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/SparsePropagation.h
lib/Analysis/SparsePropagation.cpp

index 147632930600f2c4fd2358d38c8f8456910eadd2..1e2114840ad4f08327d1a44f70f11afbc26187be 100644 (file)
@@ -138,7 +138,7 @@ public:
   ///
   void Solve(Function &F);
   
-  void Print(Function &F, std::ostream &OS);
+  void Print(Function &F, std::ostream &OS) const;
 
   /// getLatticeState - Return the LatticeVal object that corresponds to the
   /// value.  If an value is not in the map, it is returned as untracked,
index 8f042c278392f6645bab6954233de8be3200b361..543306854ceda9ad186812a85a7d26151ed0b80f 100644 (file)
@@ -310,7 +310,7 @@ void SparseSolver::Solve(Function &F) {
   }
 }
 
-void SparseSolver::Print(Function &F, std::ostream &OS) {
+void SparseSolver::Print(Function &F, std::ostream &OS) const {
   OS << "\nFUNCTION: " << F.getNameStr() << "\n";
   for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
     if (!BBExecutable.count(BB))