[llvm] Emit DW_AT_identifier_case for compile units (PR #216197)
Jeremy Morse via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 02:21:44 PDT 2026
================
@@ -0,0 +1,41 @@
+; AIX and zOS don't support DWARF 6 DW_AT_language_name
+; XFAIL: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}}
+; RUN: %llc_dwarf -filetype=obj -O0 < %s | llvm-dwarfdump -debug-info - | FileCheck %s
+
+; Test that DW_AT_identifier_case is emitted for case-insensitive languages
+; (Fortran) and omitted for case-sensitive languages (C++).
+
+; Fortran via old-style language field
+; CHECK: DW_AT_language (DW_LANG_Fortran90)
+; CHECK-NEXT: DW_AT_identifier_case (DW_ID_case_insensitive)
+
+; C++ via old-style language field — no DW_AT_identifier_case emitted
+; CHECK: DW_AT_language (DW_LANG_C_plus_plus)
+; CHECK-NOT: DW_AT_identifier_case
+; CHECK: DW_AT_name
----------------
jmorse wrote:
I suspect this could be fragile if attributes ever re-order (unlikely, but I don't think there's a guarantee). IMHO the test would be even better if you used the `--implicit-check-not` option for FileCheck to ensure there are no extra `DW_AT_identifier_case` attributes, that'd mean it doesn't matter where the new attribute appeared if an undesired one is found.
https://github.com/llvm/llvm-project/pull/216197
More information about the llvm-commits
mailing list