1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

[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
This commit is contained in:
Chandler Carruth 2015-09-10 04:22:36 +00:00
parent b0c5d21894
commit 812097ec2e

View File

@ -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;
}