[clang] [llvm] [NVPTX] Fix for device function pointer having the same name as generated callprototype (PR #205639)

Daniel Donenfeld via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 9 14:49:08 PDT 2026


================
@@ -28,9 +29,10 @@ class NVPTXMachineFunctionInfo : public MachineFunctionInfo {
   /// references.
   SmallPtrSet<const MCSymbol *, 8> ImageHandleSymbols;
 
+  using CallProtoTy = std::pair<const CallBase *, MCSymbol *>;
   /// Stores a mapping from a unique call-site id to the call instruction that
   /// needs an indirect-call prototype emitted.
-  std::map<unsigned, const CallBase *> CallPrototypes;
+  std::map<unsigned, CallProtoTy> CallPrototypes;
----------------
daniel-donenfeld wrote:

The ID index is globally unique so while they are contiguous they don't always start at 0. Using a map simplifies the logic compared to storing the starting callsite ID per function.

https://github.com/llvm/llvm-project/pull/205639


More information about the cfe-commits mailing list