================
@@ -558,8 +513,9 @@ Error InstrProfSymtab::addVTableWithName(GlobalVariable 
&VTable,
       return E;
 
     bool Inserted = true;
-    std::tie(std::ignore, Inserted) = MD5VTableMap.try_emplace(
-        GlobalValue::getGUIDAssumingExternalLinkage(Name), &VTable);
+    uint64_t GUID = VTable.getGUIDIfAssigned().value_or(
----------------
teresajohnson wrote:

I see this same pattern ( 
getGUIDIfAssigned().value_or(GlobalValue::getGUIDAssumingExternalLinkage(Name)) 
) repeating a couple times in this PR - does it make sense for it to be a 
method on the GV? Or is it pretty limited to these 2 instances?

https://github.com/llvm/llvm-project/pull/214134
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to