[Mlir-commits] [clang] [compiler-rt] [flang] [llvm] [mlir] [DebugMetadata][DwarfDebug][CodeView] Support function-local static variables in lexical block scopes (6/7) (PR #187927)

Kristina Bessonova llvmlistbot at llvm.org
Thu Jul 2 07:36:59 PDT 2026


================
@@ -2124,6 +2124,10 @@ class DICompileUnit : public DIScope {
   }
 
 public:
+  constexpr static unsigned GLOBALS_IDX = 6;
----------------
chbessonova wrote:

I'd rather not do this, it looks misleading to me. It's not clear what the purpose of these globals is or which metadata kind they belong to. It also feels inconsistent even within DICompileUnit, since, for example, retainedTypes does not have a corresponding operand number global. Given that operand numbers are still hardcoded explicitly in other places, I'd prefer to leave these three as they were.

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


More information about the Mlir-commits mailing list