@@ -479,8 +479,7 @@ void AddDebugInfoPass::handleFuncOp(mlir::func::FuncOp funcOp,
479
479
}
480
480
481
481
auto addTargetOpDISP = [&](bool lineTableOnly,
482
- const llvm::SmallVector<mlir::LLVM::DINodeAttr>
483
- &entities) {
482
+ llvm::ArrayRef<mlir::LLVM::DINodeAttr> entities) {
484
483
// When we process the DeclareOp inside the OpenMP target region, all the
485
484
// variables get the DISubprogram of the parent function of the target op as
486
485
// the scope. In the codegen (to llvm ir), OpenMP target op results in the
@@ -559,7 +558,7 @@ void AddDebugInfoPass::handleFuncOp(mlir::func::FuncOp funcOp,
559
558
line, line, subprogramFlags, subTypeAttr, /* retainedNodes=*/ {},
560
559
/* annotations=*/ {});
561
560
funcOp->setLoc (builder.getFusedLoc ({l}, spAttr));
562
- addTargetOpDISP (true , {});
561
+ addTargetOpDISP (/* lineTableOnly= */ true , /* entities= */ {});
563
562
return ;
564
563
}
565
564
@@ -617,7 +616,7 @@ void AddDebugInfoPass::handleFuncOp(mlir::func::FuncOp funcOp,
617
616
funcName, fullName, funcFileAttr, line, line, subprogramFlags,
618
617
subTypeAttr, entities, /* annotations=*/ {});
619
618
funcOp->setLoc (builder.getFusedLoc ({l}, spAttr));
620
- addTargetOpDISP (false , entities);
619
+ addTargetOpDISP (/* lineTableOnly= */ false , entities);
621
620
622
621
funcOp.walk ([&](fir::cg::XDeclareOp declOp) {
623
622
mlir::LLVM::DISubprogramAttr spTy = spAttr;
0 commit comments