[flang-commits] [flang] [mlir] [MLIR][LLVM] Add DebugNameTableKind to DICompileUnit (PR #87974)

Billy Zhu via flang-commits flang-commits at lists.llvm.org
Mon Apr 8 07:36:26 PDT 2024


================
@@ -350,8 +350,21 @@ def LLVM_DICompileUnitAttr : LLVM_Attr<"DICompileUnit", "di_compile_unit",
     "DIFileAttr":$file,
     OptionalParameter<"StringAttr">:$producer,
     "bool":$isOptimized,
-    "DIEmissionKind":$emissionKind
+    "DIEmissionKind":$emissionKind,
+    DefaultValuedParameter<
+      "DINameTableKind", "DINameTableKind::Default">:$nameTableKind
----------------
zyx-billy wrote:

I think it still helps when parsing IR, so that even those that don't have a value will get the default value. And those with the default don't need to print, which is similar to llvm behavior. For emissionKind, llvm always prints the value, which is I think the only difference 🤔

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


More information about the flang-commits mailing list