summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/FunctionInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/FunctionInfo.cpp')
-rw-r--r--llvm/lib/IR/FunctionInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/FunctionInfo.cpp b/llvm/lib/IR/FunctionInfo.cpp
index d26c7a4e9a0..17a67bcf047 100644
--- a/llvm/lib/IR/FunctionInfo.cpp
+++ b/llvm/lib/IR/FunctionInfo.cpp
@@ -31,6 +31,10 @@ void FunctionInfoIndex::mergeFrom(std::unique_ptr<FunctionInfoIndex> Other,
assert(List.size() == 1);
std::unique_ptr<FunctionInfo> Info = std::move(List.front());
+ // Skip if there was no function summary section.
+ if (!Info->functionSummary())
+ continue;
+
// Add the module path string ref for this module if we haven't already
// saved a reference to it.
if (ModPath.empty())
OpenPOWER on IntegriCloud