================
@@ -7304,9 +7280,13 @@
ModuleSummaryIndexBitcodeReader::getValueInfoFromValueId(unsigned ValueId) {
void ModuleSummaryIndexBitcodeReader::setValueGUID(
uint64_t ValueID, StringRef ValueName, GlobalValue::LinkageTypes Linkage,
StringRef SourceFileName) {
- std::string GlobalId =
- GlobalValue::getGlobalIdentifier(ValueName, Linkage, SourceFileName);
- auto ValueGUID = GlobalValue::getGUIDAssumingExternalLinkage(GlobalId);
+ GlobalValue::GUID ValueGUID = 0;
+ if (ValueID < DefinedGUIDs.size())
+ ValueGUID = DefinedGUIDs[ValueID];
+ if (ValueGUID == 0)
----------------
orodley wrote:
I think it might be possible in theory? The `DefinedGUIDs` list is just
initialised to all zeroes and then we set the GUID for every `ValueID`, as long
as it has one. So if a particular value doesn't get an assigned `GUID` because
it `isDeclaration` then its entry will be 0. I'll try changing this and seeing
if this is ever possible in practice.
https://github.com/llvm/llvm-project/pull/184065
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits