diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-09-10 04:22:36 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-09-10 04:22:36 +0000 |
commit | 87275186d1eb1fde38e133f2852317d817907bc5 (patch) | |
tree | 8256ab04acb2080de2190b18abb002d3569410e7 /llvm/lib/IR/LegacyPassManager.cpp | |
parent | b1e3a9ae8d30e23186f08548f9bd3ba79c09ea1c (diff) | |
download | bcm5719-llvm-87275186d1eb1fde38e133f2852317d817907bc5.tar.gz bcm5719-llvm-87275186d1eb1fde38e133f2852317d817907bc5.zip |
[LPM] Simplify this code and fix a compile error for compilers that
don't correctly implement the scoping rules of C++11 range based for
loops. This kind of aliasing isn't a good idea anyways (and wasn't
really intended).
llvm-svn: 247241
Diffstat (limited to 'llvm/lib/IR/LegacyPassManager.cpp')
-rw-r--r-- | llvm/lib/IR/LegacyPassManager.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp index a3e83fd5279..aec6874332a 100644 --- a/llvm/lib/IR/LegacyPassManager.cpp +++ b/llvm/lib/IR/LegacyPassManager.cpp @@ -729,9 +729,7 @@ void PMTopLevelManager::addImmutablePass(ImmutablePass *P) { // fast lookup. const PassInfo *PassInf = findAnalysisPassInfo(AID); assert(PassInf && "Expected all immutable passes to be initialized"); - const std::vector<const PassInfo*> &ImmPI = - PassInf->getInterfacesImplemented(); - for (const PassInfo *ImmPI : ImmPI) + for (const PassInfo *ImmPI : PassInf->getInterfacesImplemented()) ImmutablePassMap[ImmPI->getTypeInfo()] = P; } |