Skip to content

Commit 196dfeb

Browse files
committed
update comment
1 parent aa366ae commit 196dfeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ class DeclareOpConversion : public mlir::OpRewritePattern<fir::DeclareOp> {
305305
declareOp.getTypeparams(), declareOp.getDummyScope(),
306306
declareOp.getUniqName());
307307

308-
// attach metadatas from fir.declare to fircg.ext_declare
308+
// Propagate all attributes to fircg.ext_declare to avoid losing metadata
309+
// including CUDA and OpenACC attributes.
309310
for (const mlir::NamedAttribute &attr : declareOp->getAttrs())
310311
xDeclOp->setAttr(attr.getName(), attr.getValue());
311312

0 commit comments

Comments
 (0)