diff options
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 9d907773cb3..11c9b131da7 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -5566,12 +5566,14 @@ std::error_code FunctionIndexBitcodeReader::parseModule() { case BitstreamEntry::SubBlock: if (CheckFuncSummaryPresenceOnly) { - if (Entry.ID == bitc::FUNCTION_SUMMARY_BLOCK_ID) + if (Entry.ID == bitc::FUNCTION_SUMMARY_BLOCK_ID) { SeenFuncSummary = true; + // No need to parse the rest since we found the summary. + return std::error_code(); + } if (Stream.SkipBlock()) return error("Invalid record"); - // No need to parse the rest since we found the summary. - return std::error_code(); + continue; } switch (Entry.ID) { default: // Skip unknown content. |