[flang-commits] [flang] [flang][cuda] Recognize mangled on_device() names in CUFFunctionRewrite (PR #207298)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Thu Jul 2 19:25:08 PDT 2026


================
@@ -78,8 +78,14 @@ class CallConversion : public OpRewritePattern<fir::CallOp> {
     return fir::ConvertOp::create(rewriter, loc, op.getResult(0).getType(), t);
   }
 
+  // on_device may reach this pass under different symbol names depending on how
+  // it was declared and when the pass runs: its bind(c) name ("on_device"), its
+  // Fortran internal name ("_QPon_device"), or its externally-mangled name
+  // after external-name conversion ("on_device_").
   const llvm::StringMap<genFunctionType> genMappings_ = {
-      {"on_device", &genOnDevice}};
+      {"on_device", &genOnDevice},
+      {"_QPon_device", &genOnDevice},
----------------
clementval wrote:

Where does this symbol come from? Is it in a specific module? 

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


More information about the flang-commits mailing list