summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/IR/LegacyPassManagers.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/include/llvm/IR/LegacyPassManagers.h b/llvm/include/llvm/IR/LegacyPassManagers.h
index af045585691..418702c0b78 100644
--- a/llvm/include/llvm/IR/LegacyPassManagers.h
+++ b/llvm/include/llvm/IR/LegacyPassManagers.h
@@ -264,12 +264,15 @@ private:
// TODO: We could consider sorting the dependency arrays within the
// AnalysisUsage (since they are conceptually unordered).
ID.AddBoolean(AU.getPreservesAll());
- for (auto &Vec : {AU.getRequiredSet(), AU.getRequiredTransitiveSet(),
- AU.getPreservedSet(), AU.getUsedSet()}) {
+ auto ProfileVec = [&](const SmallVectorImpl<AnalysisID>& Vec) {
ID.AddInteger(Vec.size());
for(AnalysisID AID : Vec)
ID.AddPointer(AID);
- }
+ };
+ ProfileVec(AU.getRequiredSet());
+ ProfileVec(AU.getRequiredTransitiveSet());
+ ProfileVec(AU.getPreservedSet());
+ ProfileVec(AU.getUsedSet());
}
};
OpenPOWER on IntegriCloud