================ @@ -1818,16 +1852,17 @@ static void genTargetClauses( llvm::SmallVectorImpl<const semantics::Symbol *> &hasDeviceAddrSyms, llvm::SmallVectorImpl<const semantics::Symbol *> &isDevicePtrSyms, llvm::SmallVectorImpl<const semantics::Symbol *> &mapSyms) { + HostEvalInfo *hostEvalInfo = getHostEvalInfoStackTop(converter); ClauseProcessor cp(converter, semaCtx, clauses); cp.processBare(clauseOps); cp.processDefaultMap(stmtCtx, defaultMaps); cp.processDepend(symTable, stmtCtx, clauseOps); cp.processDevice(stmtCtx, clauseOps); cp.processHasDeviceAddr(stmtCtx, clauseOps, hasDeviceAddrSyms); - if (!hostEvalInfo.empty()) { + if (hostEvalInfo) { ---------------- skatrak wrote:
Nit: For consistency with `genBodyOfTargetOp`, and general conciseness ```suggestion if (HostEvalInfo *hostEvalInfo = getHostEvalInfoStackTop(converter)) { ``` https://github.com/llvm/llvm-project/pull/144898 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits