@@ -943,10 +943,8 @@ class ModuleSummaryIndexBitcodeReader : public BitcodeReaderBase {
943943 // they are recorded in the summary index being built.
944944 // We save a GUID which refers to the same global as the ValueInfo, but
945945 // ignoring the linkage, i.e. for values other than local linkage they are
946- // identical (this is the second tuple member).
947- // The third tuple member is the real GUID of the ValueInfo.
948- DenseMap<unsigned ,
949- std::tuple<ValueInfo, GlobalValue::GUID, GlobalValue::GUID>>
946+ // identical (this is the second member). ValueInfo has the real GUID.
947+ DenseMap<unsigned , std::pair<ValueInfo, GlobalValue::GUID>>
950948 ValueIdToValueInfoMap;
951949
952950 // / Map populated during module path string table parsing, from the
@@ -998,7 +996,7 @@ class ModuleSummaryIndexBitcodeReader : public BitcodeReaderBase {
998996 parseParamAccesses (ArrayRef<uint64_t > Record);
999997
1000998 template <bool AllowNullValueInfo = false >
1001- std::tuple <ValueInfo, GlobalValue::GUID , GlobalValue::GUID>
999+ std::pair <ValueInfo, GlobalValue::GUID>
10021000 getValueInfoFromValueId (unsigned ValueId);
10031001
10041002 void addThisModule ();
@@ -7102,7 +7100,7 @@ ModuleSummaryIndexBitcodeReader::getThisModule() {
71027100}
71037101
71047102template <bool AllowNullValueInfo>
7105- std::tuple <ValueInfo, GlobalValue::GUID , GlobalValue::GUID>
7103+ std::pair <ValueInfo, GlobalValue::GUID>
71067104ModuleSummaryIndexBitcodeReader::getValueInfoFromValueId (unsigned ValueId) {
71077105 auto VGI = ValueIdToValueInfoMap[ValueId];
71087106 // We can have a null value info for memprof callsite info records in
@@ -7129,10 +7127,10 @@ void ModuleSummaryIndexBitcodeReader::setValueGUID(
71297127 // UseStrtab is false for legacy summary formats and value names are
71307128 // created on stack. In that case we save the name in a string saver in
71317129 // the index so that the value name can be recorded.
7132- ValueIdToValueInfoMap[ValueID] = std::make_tuple (
7130+ ValueIdToValueInfoMap[ValueID] = std::make_pair (
71337131 TheIndex.getOrInsertValueInfo (
71347132 ValueGUID, UseStrtab ? ValueName : TheIndex.saveString (ValueName)),
7135- OriginalNameID, ValueGUID );
7133+ OriginalNameID);
71367134}
71377135
71387136// Specialized value symbol table parser used when reading module index
@@ -7220,8 +7218,8 @@ Error ModuleSummaryIndexBitcodeReader::parseValueSymbolTable(
72207218 GlobalValue::GUID RefGUID = Record[1 ];
72217219 // The "original name", which is the second value of the pair will be
72227220 // overriden later by a FS_COMBINED_ORIGINAL_NAME in the combined index.
7223- ValueIdToValueInfoMap[ValueID] = std::make_tuple (
7224- TheIndex.getOrInsertValueInfo (RefGUID), RefGUID , RefGUID);
7221+ ValueIdToValueInfoMap[ValueID] =
7222+ std::make_pair ( TheIndex.getOrInsertValueInfo (RefGUID), RefGUID);
72257223 break ;
72267224 }
72277225 }
@@ -7621,8 +7619,8 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
76217619 } else {
76227620 RefGUID = Record[1 ];
76237621 }
7624- ValueIdToValueInfoMap[ValueID] = std::make_tuple (
7625- TheIndex.getOrInsertValueInfo (RefGUID), RefGUID , RefGUID);
7622+ ValueIdToValueInfoMap[ValueID] =
7623+ std::make_pair ( TheIndex.getOrInsertValueInfo (RefGUID), RefGUID);
76267624 break ;
76277625 }
76287626 // FS_PERMODULE is legacy and does not have support for the tail call flag.
@@ -7680,9 +7678,8 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
76807678 // the prevailing copy of a symbol. The linker doesn't resolve local
76817679 // linkage values so don't check whether those are prevailing.
76827680 auto LT = (GlobalValue::LinkageTypes)Flags.Linkage ;
7683- if (IsPrevailing &&
7684- !GlobalValue::isLocalLinkage (LT) &&
7685- !IsPrevailing (std::get<2 >(VIAndOriginalGUID))) {
7681+ if (IsPrevailing && !GlobalValue::isLocalLinkage (LT) &&
7682+ !IsPrevailing (VIAndOriginalGUID.first .getGUID ())) {
76867683 PendingCallsites.clear ();
76877684 PendingAllocs.clear ();
76887685 }
0 commit comments