Skip to content

Commit aa2e579

Browse files
committed
[flang][debug] Process DeclareOp outside of entry block.
1 parent 70389c6 commit aa2e579

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

flang/lib/Optimizer/Transforms/AddDebugInfo.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,7 @@ void AddDebugInfoPass::handleFuncOp(mlir::func::FuncOp funcOp,
403403
funcOp->setLoc(builder.getFusedLoc({l}, spAttr));
404404

405405
funcOp.walk([&](fir::cg::XDeclareOp declOp) {
406-
// FIXME: We currently dont handle variables that are not in the entry
407-
// blocks of the fuctions. These may be variable or arguments used in the
408-
// OpenMP target regions.
409-
if (&funcOp.front() == declOp->getBlock())
410-
handleDeclareOp(declOp, fileAttr, spAttr, typeGen, symbolTable);
406+
handleDeclareOp(declOp, fileAttr, spAttr, typeGen, symbolTable);
411407
});
412408
}
413409

0 commit comments

Comments
 (0)