[flang-commits] [flang] [flang][debug] Avoid redundant module info. (PR #161542)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Thu Oct 2 03:09:05 PDT 2025
================
@@ -286,10 +286,11 @@ mlir::LLVM::DIModuleAttr AddDebugInfoPass::getOrCreateModuleAttr(
modAttr = iter->getValue();
} else {
modAttr = mlir::LLVM::DIModuleAttr::get(
- context, fileAttr, scope, mlir::StringAttr::get(context, name),
+ context, decl ? nullptr : fileAttr, decl ? nullptr : scope,
----------------
tblah wrote:
nit: I don't think it is obvious that setting decl isn't sufficient on its own. Please could you add a comment explaining why `fileAttr` and `line` aren't set when `decl == true`
https://github.com/llvm/llvm-project/pull/161542
More information about the flang-commits
mailing list