aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/PassManagers.h2
-rw-r--r--lib/VMCore/PassManager.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/PassManagers.h b/include/llvm/PassManagers.h
index 1f00b3e..ce34f31 100644
--- a/include/llvm/PassManagers.h
+++ b/include/llvm/PassManagers.h
@@ -184,7 +184,7 @@ public:
void schedulePass(Pass *P);
/// Set pass P as the last user of the given analysis passes.
- void setLastUser(SmallVectorImpl<Pass *> &AnalysisPasses, Pass *P);
+ void setLastUser(const SmallVectorImpl<Pass *> &AnalysisPasses, Pass *P);
/// Collect passes whose last user is P
void collectLastUses(SmallVectorImpl<Pass *> &LastUses, Pass *P);
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp
index 39925c9..c1f1d5a 100644
--- a/lib/VMCore/PassManager.cpp
+++ b/lib/VMCore/PassManager.cpp
@@ -497,9 +497,10 @@ PMTopLevelManager::PMTopLevelManager(PMDataManager *PMDM) {
}
/// Set pass P as the last user of the given analysis passes.
-void PMTopLevelManager::setLastUser(SmallVectorImpl<Pass *> &AnalysisPasses,
- Pass *P) {
- for (SmallVectorImpl<Pass *>::iterator I = AnalysisPasses.begin(),
+void
+PMTopLevelManager::setLastUser(const SmallVectorImpl<Pass *> &AnalysisPasses,
+ Pass *P) {
+ for (SmallVectorImpl<Pass *>::const_iterator I = AnalysisPasses.begin(),
E = AnalysisPasses.end(); I != E; ++I) {
Pass *AP = *I;
LastUser[AP] = P;