Skip to content

Commit 0d51206

Browse files
committed
Handle review comments.
1 parent 6c325bd commit 0d51206

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

flang/lib/Optimizer/Transforms/AddDebugInfo.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,7 @@ void AddDebugInfoPass::handleFuncOp(mlir::func::FuncOp funcOp,
479479
}
480480

481481
auto addTargetOpDISP = [&](bool lineTableOnly,
482-
const llvm::SmallVector<mlir::LLVM::DINodeAttr>
483-
&entities) {
482+
llvm::ArrayRef<mlir::LLVM::DINodeAttr> entities) {
484483
// When we process the DeclareOp inside the OpenMP target region, all the
485484
// variables get the DISubprogram of the parent function of the target op as
486485
// 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,
559558
line, line, subprogramFlags, subTypeAttr, /*retainedNodes=*/{},
560559
/*annotations=*/{});
561560
funcOp->setLoc(builder.getFusedLoc({l}, spAttr));
562-
addTargetOpDISP(true, {});
561+
addTargetOpDISP(/*lineTableOnly=*/true, /*entities=*/{});
563562
return;
564563
}
565564

@@ -617,7 +616,7 @@ void AddDebugInfoPass::handleFuncOp(mlir::func::FuncOp funcOp,
617616
funcName, fullName, funcFileAttr, line, line, subprogramFlags,
618617
subTypeAttr, entities, /*annotations=*/{});
619618
funcOp->setLoc(builder.getFusedLoc({l}, spAttr));
620-
addTargetOpDISP(false, entities);
619+
addTargetOpDISP(/*lineTableOnly=*/false, entities);
621620

622621
funcOp.walk([&](fir::cg::XDeclareOp declOp) {
623622
mlir::LLVM::DISubprogramAttr spTy = spAttr;

0 commit comments

Comments
 (0)