[llvm] r247241 - [LPM] Simplify this code and fix a compile error for compilers that
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 21:22:36 PDT 2015
Author: chandlerc
Date: Wed Sep 9 23:22:36 2015
New Revision: 247241
URL: http://llvm.org/viewvc/llvm-project?rev=247241&view=rev
Log:
[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).
Modified:
llvm/trunk/lib/IR/LegacyPassManager.cpp
Modified: llvm/trunk/lib/IR/LegacyPassManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/LegacyPassManager.cpp?rev=247241&r1=247240&r2=247241&view=diff
==============================================================================
--- llvm/trunk/lib/IR/LegacyPassManager.cpp (original)
+++ llvm/trunk/lib/IR/LegacyPassManager.cpp Wed Sep 9 23:22:36 2015
@@ -729,9 +729,7 @@ void PMTopLevelManager::addImmutablePass
// 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;
}
More information about the llvm-commits
mailing list