aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-10-12 00:12:29 +0000
committerDan Gohman <gohman@apple.com>2010-10-12 00:12:29 +0000
commit568a63db96ea59b988c916a7777db7e3e39352b1 (patch)
tree1f9f2bba8f56e2bd22e8ec404e854e5ec1f089b4
parentebb1834e86d8da5fe7c63986bf8f350574a40a6c (diff)
downloadexternal_llvm-568a63db96ea59b988c916a7777db7e3e39352b1.zip
external_llvm-568a63db96ea59b988c916a7777db7e3e39352b1.tar.gz
external_llvm-568a63db96ea59b988c916a7777db7e3e39352b1.tar.bz2
Constify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116277 91177308-0d34-0410-b5e6-96231b3b80d8
-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;