Skip to content

Commit

Permalink
[LPM] Simplify this code and fix a compile error for compilers that
Browse files Browse the repository at this point in the history
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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247241 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chandlerc committed Sep 10, 2015
1 parent b29f7b8 commit 9c7d278
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/IR/LegacyPassManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9c7d278

Please sign in to comment.