aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/IPO/FunctionAttrs.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/FunctionAttrs.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
index 5c17b9e..6fe81f7b 100644
--- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -319,8 +319,9 @@ static FunctionSummary *calculatePrevailingSummary(
function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
IsPrevailing) {
- if (CachedPrevailingSummary.count(VI))
- return CachedPrevailingSummary[VI];
+ if (auto It = CachedPrevailingSummary.find(VI);
+ It != CachedPrevailingSummary.end())
+ return It->second;
/// At this point, prevailing symbols have been resolved. The following leads
/// to returning a conservative result: