[flang-commits] [flang] [flang][debug] Generate DWARF debug info using fir.use_stmt. (PR #168541)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Wed Jan 14 09:45:14 PST 2026
================
@@ -136,6 +150,34 @@ mlir::StringAttr getTargetFunctionName(mlir::MLIRContext *context,
deviceId, fileId, parentName, line)));
}
+/// Check if a global represents a module variable
+bool isModuleVariable(fir::GlobalOp globalOp) {
+ std::pair result = fir::NameUniquer::deconstruct(globalOp.getSymName());
+ return result.first == fir::NameUniquer::NameKind::VARIABLE &&
+ result.second.procs.empty() && !result.second.modules.empty();
+}
+
+// Look up DIGlobalVariable from a global symbol
+std::optional<mlir::LLVM::DIGlobalVariableAttr>
+lookupDIGlobalVariable(llvm::StringRef symbolName,
----------------
tblah wrote:
nit: static
https://github.com/llvm/llvm-project/pull/168541
More information about the flang-commits
mailing list