[Lldb-commits] [lldb] [llvm] Add DW_LNAME_HIP (PR #180999)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 16 09:25:13 PST 2026
https://github.com/accauble updated https://github.com/llvm/llvm-project/pull/180999
>From f29b987c87d6ef3e5e64c2e097863019609926b7 Mon Sep 17 00:00:00 2001
From: Allyson Cauble-Chantrenne <Allyson.Cauble-Chantrenne at amd.com>
Date: Wed, 11 Feb 2026 11:05:58 -0600
Subject: [PATCH 1/3] In PR #89980, DW_LNAME_HIP was not added because of a
value conflict with DW_LNAME_Assembly. The value of DW_LNAME_HIP has been
updated in https://dwarfstd.org/languages-v6.html . This commit adds
DW_LNAME_HIP.
---
llvm/include/llvm/BinaryFormat/Dwarf.def | 2 +-
llvm/include/llvm/BinaryFormat/Dwarf.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/llvm/include/llvm/BinaryFormat/Dwarf.def b/llvm/include/llvm/BinaryFormat/Dwarf.def
index fbf22cc6f760b..75f1061c471c6 100644
--- a/llvm/include/llvm/BinaryFormat/Dwarf.def
+++ b/llvm/include/llvm/BinaryFormat/Dwarf.def
@@ -1072,7 +1072,6 @@ HANDLE_DW_LNAME(0x001a, Swift, "Swift", 0) // VVMM
HANDLE_DW_LNAME(0x001b, UPC, "Unified Parallel C (UPC)", 0)
HANDLE_DW_LNAME(0x001c, Zig, "Zig", 0)
HANDLE_DW_LNAME(0x001d, Assembly, "Assembly", 0)
-// Conflict: HANDLE_DW_LNAME(0x001d, HIP, "HIP", 0)
HANDLE_DW_LNAME(0x001e, C_sharp, "C#", 0)
HANDLE_DW_LNAME(0x001f, Mojo, "Mojo", 0)
HANDLE_DW_LNAME(0x0020, GLSL, "OpenGL Shading Language", 0) // VVMMPP
@@ -1084,6 +1083,7 @@ HANDLE_DW_LNAME(0x0025, SYCL, "SYCL", 0) // YYYYRR
HANDLE_DW_LNAME(0x0026, Ruby, "Ruby", 0) // VVMMPP
HANDLE_DW_LNAME(0x0027, Move, "Move", 0) // YYYYMM
HANDLE_DW_LNAME(0x0028, Hylo, "Hylo", 0)
+HANDLE_DW_LNAME(0x0029, HIP, "HIP", 0)
HANDLE_DW_LNAME(0x002c, Metal, "Metal", 0) // VVMMPP
// DWARF attribute type encodings.
diff --git a/llvm/include/llvm/BinaryFormat/Dwarf.h b/llvm/include/llvm/BinaryFormat/Dwarf.h
index 211c0269c1f29..f4583e5bff924 100644
--- a/llvm/include/llvm/BinaryFormat/Dwarf.h
+++ b/llvm/include/llvm/BinaryFormat/Dwarf.h
@@ -301,8 +301,8 @@ inline std::optional<SourceLanguage> toDW_LANG(SourceLanguageName name,
return DW_LANG_Go;
case DW_LNAME_Haskell:
return DW_LANG_Haskell;
- // case DW_LNAME_HIP:
- // return DW_LANG_HIP;
+ case DW_LNAME_HIP:
+ return DW_LANG_HIP;
case DW_LNAME_Java:
return DW_LANG_Java;
case DW_LNAME_Julia:
@@ -430,7 +430,7 @@ toDW_LNAME(SourceLanguage language) {
case DW_LANG_Haskell:
return {{DW_LNAME_Haskell, 0}};
case DW_LANG_HIP:
- return {}; // return {{DW_LNAME_HIP, 0}};
+ return {{DW_LNAME_HIP, 0}};
case DW_LANG_Java:
return {{DW_LNAME_Java, 0}};
case DW_LANG_Julia:
>From 2bb9b94475fc3ec60eed7a8b0ebe12da6dacc5ef Mon Sep 17 00:00:00 2001
From: Allyson Cauble-Chantrenne <Allyson.Cauble-Chantrenne at amd.com>
Date: Thu, 12 Feb 2026 20:13:55 -0600
Subject: [PATCH 2/3] Added missing DW_LNAME_HIP to
llvm::dwarf::LanguageDescription
---
llvm/lib/BinaryFormat/Dwarf.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/lib/BinaryFormat/Dwarf.cpp b/llvm/lib/BinaryFormat/Dwarf.cpp
index a6c7e6afdbe7a..f31ca8caf886e 100644
--- a/llvm/lib/BinaryFormat/Dwarf.cpp
+++ b/llvm/lib/BinaryFormat/Dwarf.cpp
@@ -550,6 +550,7 @@ StringRef llvm::dwarf::LanguageDescription(dwarf::SourceLanguageName Name,
case DW_LNAME_Dylan:
case DW_LNAME_Go:
case DW_LNAME_Haskell:
+ case DW_LNAME_HIP:
case DW_LNAME_HLSL:
case DW_LNAME_Java:
case DW_LNAME_Julia:
>From 840cd79c1b4bfbfbca680446c9e3a9ee7ec65e98 Mon Sep 17 00:00:00 2001
From: Allyson Cauble-Chantrenne <Allyson.Cauble-Chantrenne at amd.com>
Date: Mon, 16 Feb 2026 10:47:34 -0600
Subject: [PATCH 3/3] Needed to update an lldb test which accommodated the
missing DW_LNAME_HIP enum. check-clang, check-clang-tools, check-flang,
check-lld, check-lldb, check-llvm, and check-mlir all work now so hoping this
is the last required change.
---
lldb/unittests/Target/LanguageTest.cpp | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/lldb/unittests/Target/LanguageTest.cpp b/lldb/unittests/Target/LanguageTest.cpp
index 720863bda68e4..f2e51a9e6cd87 100644
--- a/lldb/unittests/Target/LanguageTest.cpp
+++ b/lldb/unittests/Target/LanguageTest.cpp
@@ -26,11 +26,7 @@ TEST_F(LanguageTest, SourceLanguage_GetDescription) {
auto lang_type = static_cast<lldb::LanguageType>(i);
SourceLanguage lang(lang_type);
- // eLanguageTypeHIP is not implemented as a DW_LNAME because of a conflict.
- if (lang_type == lldb::eLanguageTypeHIP)
- EXPECT_FALSE(lang);
- else
- EXPECT_TRUE(lang);
+ EXPECT_TRUE(lang);
}
EXPECT_EQ(SourceLanguage(eLanguageTypeC_plus_plus).GetDescription(),
More information about the lldb-commits
mailing list