diff --git a/llvm/include/llvm/Transforms/Utils/SCCPSolver.h b/llvm/include/llvm/Transforms/Utils/SCCPSolver.h index f8966f5b7472f..a5b56dcdc6290 100644 --- a/llvm/include/llvm/Transforms/Utils/SCCPSolver.h +++ b/llvm/include/llvm/Transforms/Utils/SCCPSolver.h @@ -143,11 +143,12 @@ class SCCPSolver { /// getTrackedGlobals - Get and return the set of inferred initializers for /// global variables. - const DenseMap &getTrackedGlobals(); + const DenseMap & + getTrackedGlobals() const; /// getMRVFunctionsTracked - Get the set of functions which return multiple /// values tracked by the pass. - const SmallPtrSet &getMRVFunctionsTracked(); + const SmallPtrSet &getMRVFunctionsTracked() const; /// markOverdefined - Mark the specified value overdefined. This /// works with both scalars and structs. diff --git a/llvm/lib/Transforms/Utils/SCCPSolver.cpp b/llvm/lib/Transforms/Utils/SCCPSolver.cpp index 6b573f61a3c2a..4535f86f9d68b 100644 --- a/llvm/lib/Transforms/Utils/SCCPSolver.cpp +++ b/llvm/lib/Transforms/Utils/SCCPSolver.cpp @@ -839,15 +839,16 @@ class SCCPInstVisitor : public InstVisitor { return I->second; } - const MapVector &getTrackedRetVals() { + const MapVector &getTrackedRetVals() const { return TrackedRetVals; } - const DenseMap &getTrackedGlobals() { + const DenseMap & + getTrackedGlobals() const { return TrackedGlobals; } - const SmallPtrSet &getMRVFunctionsTracked() { + const SmallPtrSet &getMRVFunctionsTracked() const { return MRVFunctionsTracked; } @@ -2226,11 +2227,11 @@ SCCPSolver::getTrackedRetVals() const { } const DenseMap & -SCCPSolver::getTrackedGlobals() { +SCCPSolver::getTrackedGlobals() const { return Visitor->getTrackedGlobals(); } -const SmallPtrSet &SCCPSolver::getMRVFunctionsTracked() { +const SmallPtrSet &SCCPSolver::getMRVFunctionsTracked() const { return Visitor->getMRVFunctionsTracked(); }