================
@@ -52,11 +52,15 @@ class NVPTXMachineFunctionInfo : public MachineFunctionInfo 
{
     return ImageHandleSymbols.contains(Symbol);
   }
 
-  void addCallPrototype(unsigned Id, const CallBase *CB) {
-    CallPrototypes.try_emplace(Id, CB);
+  MCSymbol *addCallPrototype(const CallBase *CB, MachineFunction &MF) {
+    MCSymbol *Symbol =
+        MF.getContext().createTempSymbol("prototype_",
+                                         /*AlwaysAddSuffix=*/true);
+    CallPrototypes.push_back({CB, Symbol});
+    return Symbol;
   }
 
-  const std::map<unsigned, const CallBase *> &getCallPrototypes() const {
+  const std::vector<CallProtoTy> &getCallPrototypes() const {
     return CallPrototypes;
   }
----------------
AlexMaclean wrote:

Nit: return an ArrayRef

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