[flang-commits] [flang] [flang][debug] Generate DWARF debug info using fir.use_stmt. (PR #168541)

Abid Qadeer via flang-commits flang-commits at lists.llvm.org
Mon Jan 19 08:56:03 PST 2026


================
@@ -662,6 +700,104 @@ void AddDebugInfoPass::handleFuncOp(mlir::func::FuncOp funcOp,
   commonBlockMap.clear();
 }
 
+// Process USE with ONLY clause
+void AddDebugInfoPass::handleOnlyClause(
+    fir::UseStmtOp useOp, mlir::LLVM::DISubprogramAttr spAttr,
+    mlir::LLVM::DIFileAttr fileAttr, mlir::SymbolTable *symbolTable,
+    llvm::DenseSet<mlir::LLVM::DIImportedEntityAttr> &importedModules) {
+  mlir::MLIRContext *context = &getContext();
+
+  auto createImportedDecl = [&](llvm::StringRef symbolName,
----------------
abidh wrote:

Done.

https://github.com/llvm/llvm-project/pull/168541


More information about the flang-commits mailing list