[flang-commits] [flang] [flang][debug] Emit debug info for named constants (PR #213974)

Abid Qadeer via flang-commits flang-commits at lists.llvm.org
Thu Aug 6 03:54:25 PDT 2026


================
@@ -179,11 +179,22 @@ mlir::StringAttr getTargetFunctionName(mlir::MLIRContext *context,
 
 } // namespace
 
-// Check if a global represents a module variable
-static bool isModuleVariable(fir::GlobalOp globalOp) {
+// Check if a name is that of a data object, which in Fortran is a variable or
+// a named constant.
+static bool isDataObjectName(fir::NameUniquer::NameKind kind) {
----------------
abidh wrote:

Thanks for the review. I've left it as plain static for now, mainly to stay consistent with the other small helpers nearby that aren't marked inline. Happy to add it though, my understanding was that inline doesn't buy much for a static function in a .cpp file since it already has internal linkage, but I may well be missing something here. If you'd prefer it marked, I'm glad to do that and follow up with a separate NFC patch for the neighbouring helpers so they all match.

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


More information about the flang-commits mailing list