Index: lib/Transforms/Utils/LoopUtils.cpp =================================================================== --- lib/Transforms/Utils/LoopUtils.cpp +++ lib/Transforms/Utils/LoopUtils.cpp @@ -929,6 +929,14 @@ return UsedOutside; } +// We locally access their IDs for LoopSimplify and LCSSA here because +// users shouldn't directly get them from this header. +namespace llvm +{ + extern char &LoopSimplifyID; + extern char &LCSSAID; +} + void llvm::getLoopAnalysisUsage(AnalysisUsage &AU) { // By definition, all loop passes need the LoopInfo analysis and the // Dominator tree it depends on. Because they all participate in the loop @@ -938,10 +946,7 @@ AU.addRequired(); AU.addPreserved(); - // We must also preserve LoopSimplify and LCSSA. We locally access their IDs - // here because users shouldn't directly get them from this header. - extern char &LoopSimplifyID; - extern char &LCSSAID; + // We must also preserve LoopSimplify and LCSSA. AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID); AU.addRequiredID(LCSSAID);