@@ -943,10 +943,8 @@ class ModuleSummaryIndexBitcodeReader : public BitcodeReaderBase {
943
943
// they are recorded in the summary index being built.
944
944
// We save a GUID which refers to the same global as the ValueInfo, but
945
945
// 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>>
950
948
ValueIdToValueInfoMap;
951
949
952
950
// / Map populated during module path string table parsing, from the
@@ -998,7 +996,7 @@ class ModuleSummaryIndexBitcodeReader : public BitcodeReaderBase {
998
996
parseParamAccesses (ArrayRef<uint64_t > Record);
999
997
1000
998
template <bool AllowNullValueInfo = false >
1001
- std::tuple <ValueInfo, GlobalValue::GUID , GlobalValue::GUID>
999
+ std::pair <ValueInfo, GlobalValue::GUID>
1002
1000
getValueInfoFromValueId (unsigned ValueId);
1003
1001
1004
1002
void addThisModule ();
@@ -7102,7 +7100,7 @@ ModuleSummaryIndexBitcodeReader::getThisModule() {
7102
7100
}
7103
7101
7104
7102
template <bool AllowNullValueInfo>
7105
- std::tuple <ValueInfo, GlobalValue::GUID , GlobalValue::GUID>
7103
+ std::pair <ValueInfo, GlobalValue::GUID>
7106
7104
ModuleSummaryIndexBitcodeReader::getValueInfoFromValueId (unsigned ValueId) {
7107
7105
auto VGI = ValueIdToValueInfoMap[ValueId];
7108
7106
// We can have a null value info for memprof callsite info records in
@@ -7129,10 +7127,10 @@ void ModuleSummaryIndexBitcodeReader::setValueGUID(
7129
7127
// UseStrtab is false for legacy summary formats and value names are
7130
7128
// created on stack. In that case we save the name in a string saver in
7131
7129
// the index so that the value name can be recorded.
7132
- ValueIdToValueInfoMap[ValueID] = std::make_tuple (
7130
+ ValueIdToValueInfoMap[ValueID] = std::make_pair (
7133
7131
TheIndex.getOrInsertValueInfo (
7134
7132
ValueGUID, UseStrtab ? ValueName : TheIndex.saveString (ValueName)),
7135
- OriginalNameID, ValueGUID );
7133
+ OriginalNameID);
7136
7134
}
7137
7135
7138
7136
// Specialized value symbol table parser used when reading module index
@@ -7220,8 +7218,8 @@ Error ModuleSummaryIndexBitcodeReader::parseValueSymbolTable(
7220
7218
GlobalValue::GUID RefGUID = Record[1 ];
7221
7219
// The "original name", which is the second value of the pair will be
7222
7220
// 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);
7225
7223
break ;
7226
7224
}
7227
7225
}
@@ -7621,8 +7619,8 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
7621
7619
} else {
7622
7620
RefGUID = Record[1 ];
7623
7621
}
7624
- ValueIdToValueInfoMap[ValueID] = std::make_tuple (
7625
- TheIndex.getOrInsertValueInfo (RefGUID), RefGUID , RefGUID);
7622
+ ValueIdToValueInfoMap[ValueID] =
7623
+ std::make_pair ( TheIndex.getOrInsertValueInfo (RefGUID), RefGUID);
7626
7624
break ;
7627
7625
}
7628
7626
// FS_PERMODULE is legacy and does not have support for the tail call flag.
@@ -7680,9 +7678,8 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
7680
7678
// the prevailing copy of a symbol. The linker doesn't resolve local
7681
7679
// linkage values so don't check whether those are prevailing.
7682
7680
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 ())) {
7686
7683
PendingCallsites.clear ();
7687
7684
PendingAllocs.clear ();
7688
7685
}
0 commit comments