Recommit r256952 "Filtering IR printing for print-after-all/print-before-all"
[oota-llvm.git] / lib / IR / FunctionInfo.cpp
index d26c7a4e9a03be5a37e297e3a9b50025f21bcca5..17a67bcf04721a2668f7f8eea98320eebac94070 100644 (file)
@@ -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())