[flang-commits] [flang] [flang][OpenMP][DoConcurrent] Emit declare mapper for records (PR #179936)
Pranav Bhandarkar via flang-commits
flang-commits at lists.llvm.org
Sun Feb 8 15:24:48 PST 2026
================
@@ -2792,7 +2792,20 @@ genTargetOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
if (auto recordType = mlir::dyn_cast_or_null<fir::RecordType>(
converter.genType(*typeSpec)))
mapperId = getOrGenImplicitDefaultDeclareMapper(
- converter, loc, recordType, mapperIdName);
+ converter.getFirOpBuilder(), loc, recordType,
+ mapperIdName,
+ [&](std::string &mapperIdName,
----------------
bhandarkar-pranav wrote:
I am missing something here. Why have you peeled out the mangler into a caller provided lambda? Both `ClauseProcessor.cpp` and `OpenMP.cpp` (here) seem to have the same lambda. And `DoConcurrentConversion.cpp` does not provide a lambda.
Secondly, if you wish to keep the lambda, consider factoring out a utility helper function in lowering that the lambdas in `ClauseProcessor.cpp` and `Lower/OpenMP.cpp` call so that we don't have to maintain two separate pieces of code that do the same thing.
https://github.com/llvm/llvm-project/pull/179936
More information about the flang-commits
mailing list