@@ -978,6 +978,8 @@ class ModuleSummaryIndexBitcodeReader : public BitcodeReaderBase {
978978 // / Callback to ask whether a symbol is the prevailing copy when invoked
979979 // / during combined index building.
980980 std::function<bool (StringRef)> IsPrevailing = nullptr ;
981+
982+ // / Callback invoked whenever a new ValueInfo is generated.
981983 std::function<void (ValueInfo)> OnValueInfo = nullptr ;
982984
983985 // / Saves the stack ids from the STACK_IDS record to consult when adding
@@ -993,9 +995,9 @@ class ModuleSummaryIndexBitcodeReader : public BitcodeReaderBase {
993995 // / list and used to avoid repeated hash lookups.
994996 std::vector<unsigned > StackIdToIndex;
995997
996- // / A list of GUIDs defined by this module. Indexed by ValueID.
997- std::vector<uint64_t > DefinedGUIDs;
998-
998+ // / A list of GUIDs defined by this module. Indexed by ValueID.
999+ std::vector<uint64_t > DefinedGUIDs;
1000+
9991001public:
10001002 ModuleSummaryIndexBitcodeReader (
10011003 BitstreamCursor Stream, StringRef Strtab, ModuleSummaryIndex &TheIndex,
@@ -4050,9 +4052,10 @@ Error BitcodeReader::globalCleanup() {
40504052
40514053 for (size_t ValueID = 0 ; ValueID < GUIDList.size (); ValueID++) {
40524054 const auto GUID = GUIDList[ValueID];
4053- if (GUID == 0 ) continue ;
4055+ if (GUID == 0 )
4056+ continue ;
40544057
4055- const auto * Value = ValueList[ValueID];
4058+ const auto * Value = ValueList[ValueID];
40564059 TheModule->insertGUID (Value, GUID );
40574060 }
40584061
@@ -7282,13 +7285,14 @@ void ModuleSummaryIndexBitcodeReader::setValueGUID(
72827285 ValueGUID = DefinedGUIDs[ValueID];
72837286 if (ValueGUID == 0 )
72847287 ValueGUID = GlobalValue::getGUIDAssumingExternalLinkage (
7285- GlobalValue::getGlobalIdentifier (ValueName, Linkage, SourceFileName));
7288+ GlobalValue::getGlobalIdentifier (ValueName, Linkage, SourceFileName));
72867289
72877290 auto OriginalNameID = ValueGUID;
72887291 if (GlobalValue::isLocalLinkage (Linkage))
72897292 OriginalNameID = GlobalValue::getGUIDAssumingExternalLinkage (ValueName);
72907293 if (PrintSummaryGUIDs)
7291- dbgs () << " GUID " << ValueGUID << " (" << OriginalNameID << " ) is " << ValueName << " \n " ;
7294+ dbgs () << " GUID " << ValueGUID << " (" << OriginalNameID << " ) is "
7295+ << ValueName << " \n " ;
72927296
72937297 // UseStrtab is false for legacy summary formats and value names are
72947298 // created on stack. In that case we save the name in a string saver in
@@ -8720,10 +8724,10 @@ BitcodeModule::getLazyModule(LLVMContext &Context, bool ShouldLazyLoadMetadata,
87208724// We don't use ModuleIdentifier here because the client may need to control the
87218725// module path used in the combined summary (e.g. when reading summaries for
87228726// regular LTO modules).
8723- Error BitcodeModule::readSummary (
8724- ModuleSummaryIndex &CombinedIndex, StringRef ModulePath,
8725- std::function<bool (StringRef)> IsPrevailing,
8726- std::function<void(ValueInfo)> OnValueInfo) {
8727+ Error BitcodeModule::readSummary (ModuleSummaryIndex &CombinedIndex,
8728+ StringRef ModulePath,
8729+ std::function<bool (StringRef)> IsPrevailing,
8730+ std::function<void(ValueInfo)> OnValueInfo) {
87278731 BitstreamCursor Stream (Buffer);
87288732 if (Error JumpFailed = Stream.JumpToBit (ModuleBit))
87298733 return JumpFailed;
0 commit comments