[flang-commits] [flang] [mlir] [Flang][OpenMP] Add lowering support for is_device_ptr clause (PR #169331)

Kareem Ergawy via flang-commits flang-commits at lists.llvm.org
Mon Dec 1 00:03:59 PST 2025


================
@@ -2531,6 +2533,41 @@ genTargetOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
                    loc, clauseOps, defaultMaps, hasDeviceAddrSyms,
                    isDevicePtrSyms, mapSyms);
 
+  if (!isDevicePtrSyms.empty()) {
+    // is_device_ptr maps get duplicated so the clause and synthesized
+    // has_device_addr entry each own a unique MapInfoOp user, keeping
+    // MapInfoFinalization happy while still wiring the symbol into
+    // has_device_addr when the user didn’t spell it explicitly.
+    fir::FirOpBuilder &builder = converter.getFirOpBuilder();
----------------
ergawy wrote:

nit: `firOpBuilder` is already available above.

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


More information about the flang-commits mailing list