================
@@ -52,11 +54,16 @@ class NVPTXMachineFunctionInfo : public MachineFunctionInfo 
{
     return ImageHandleSymbols.contains(Symbol);
   }
 
-  void addCallPrototype(unsigned Id, const CallBase *CB) {
-    CallPrototypes.try_emplace(Id, CB);
+  void addCallPrototype(unsigned Id, const CallBase *CB, MachineFunction &MF) {
+    if (CallPrototypes.find(Id) == CallPrototypes.end()) {
+      MCSymbol *Symbol =
+          MF.getContext().createTempSymbol("prototype_" + Twine(Id),
+                                           /*AlwaysAddSuffix=*/false);
+      CallPrototypes.try_emplace(Id, CB, Symbol);
+    }
   }
----------------
daniel-donenfeld wrote:

I removed the usage of ID from the createTempSymbol call, but its still used to 
map between the callsite here and in the asm printer

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

Reply via email to