[flang-commits] [flang] [flang] Improve debug info for functions. (PR #90083)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Fri Apr 26 09:27:16 PDT 2024
================
@@ -106,14 +107,27 @@ void AddDebugInfoPass::runOnOperation() {
filePath = llvm::sys::path::parent_path(funcLoc.getFilename().getValue());
}
- mlir::StringAttr funcName =
+ mlir::StringAttr fullName =
mlir::StringAttr::get(context, funcOp.getName());
- mlir::LLVM::DIBasicTypeAttr bT = mlir::LLVM::DIBasicTypeAttr::get(
- context, llvm::dwarf::DW_TAG_base_type, "void", /*sizeInBits=*/0,
- /*encoding=*/1);
- // FIXME: Provide proper type for subroutine
+ auto result = fir::NameUniquer::deconstruct(funcOp.getName());
+ mlir::StringAttr funcName =
+ mlir::StringAttr::get(context, result.second.name);
+
+ llvm::SmallVector<mlir::LLVM::DITypeAttr> types;
+ fir::DebugTypeGenerator typeGen(module);
+ for (auto resTy : funcOp.getResultTypes()) {
+ auto tyAttr = typeGen.convertType(fir::unwrapRefType(resTy), fileAttr,
----------------
tblah wrote:
Without the VALUE keyword, fortran defaults to passing all arguments by reference
https://github.com/llvm/llvm-project/pull/90083
More information about the flang-commits
mailing list