X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FBitcode%2FReader%2FBitcodeReader.cpp;h=11c9b131da7059387605ee0c57822f50ecf1c14d;hp=9d907773cb369fb2cc0b5d95c4fa1847adfe2b88;hb=f1f60632b06de61a15f7362002ef0fe3399a2d54;hpb=ef8457f79e529990594d5c7feaf9e871fbc4b38e diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 9d907773cb3..11c9b131da7 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/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.