[ThinLTO] Add missing breaks when parsing summaries (NFC)
authorTeresa Johnson <tejohnson@google.com>
Wed, 24 Feb 2016 17:57:28 +0000 (17:57 +0000)
committerTeresa Johnson <tejohnson@google.com>
Wed, 24 Feb 2016 17:57:28 +0000 (17:57 +0000)
This wasn't causing a correctness issue, but was causing extra duplicate
entries to be added to the SummaryMap.

llvm-svn: 261757

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

index fbe9391..06a120a 100644 (file)
@@ -5643,6 +5643,7 @@ std::error_code FunctionIndexBitcodeReader::parseEntireSummary() {
       FS->setModulePath(
           TheIndex->addModulePath(Buffer->getBufferIdentifier(), 0));
       SummaryMap[ValueID] = std::move(FS);
+      break;
     }
     // FS_COMBINED_ENTRY: [modid, linkage, instcount]
     case bitc::FS_CODE_COMBINED_ENTRY: {
@@ -5654,6 +5655,7 @@ std::error_code FunctionIndexBitcodeReader::parseEntireSummary() {
       FS->setFunctionLinkage(getDecodedLinkage(RawLinkage));
       FS->setModulePath(ModuleIdMap[ModuleId]);
       SummaryMap[CurRecordBit] = std::move(FS);
+      break;
     }
     }
   }