[llvm] Add NVPTX DW_AT_LLVM_language_dialect emission. (PR #200003)
Matt Davis via llvm-commits
llvm-commits at lists.llvm.org
Thu May 28 05:53:19 PDT 2026
================
@@ -0,0 +1,85 @@
+;; Test DW_AT_LLVM_language_dialect on DW_TAG_compile_unit for NVPTX.
+;;
+;; Three compile units, each with one kernel:
+;; CU0 (default.cu): default_kernel - no dialect field
+;; CU1 (simt.cu): simt_kernel - explicit dialect: DW_LLVM_LANG_DIALECT_simt
+;; CU2 (tile.cu): tile_kernel - explicit dialect: DW_LLVM_LANG_DIALECT_tile
+;;
+;; DW_AT_LLVM_language_dialect is only emitted when
+;; DW_LLVM_LANG_DIALECT_simt or DW_LLVM_LANG_DIALECT_tile is explicitly
+;; specified.
+;;
+;; The "unknown dialect" warning path in
+;; NVPTXDwarfDebug::finishTargetUnitAttributes is not exercised here: a .ll
+;; file cannot reach it because the assembly parser, verifier, and bitcode
+;; reader all reject dialect values outside dwarf::DW_LLVM_LANG_DIALECT_max
+;; before llc ever sees the IR. That warning code is kept as a defensive
+;; safety net for programmatic IR construction and future dialect-enum
+;; expansion. The DWARF RUN line below uses --implicit-check-not to assert
+;; the happy path stays silent.
----------------
enferex wrote:
I have no issue with that, thanks for the suggestion.
https://github.com/llvm/llvm-project/pull/200003
More information about the llvm-commits
mailing list