[llvm] [DirectX] Update DXILBitcodeWriter for #162255 (PR #162531)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 8 11:43:24 PDT 2025


https://github.com/bogner created https://github.com/llvm/llvm-project/pull/162531

Fix the build with the DirectX backend enabled by using `getUnversionedName()` to match the updates of other similar uses of `getSourceLanguage()`.

>From ff752149420c250f63bdbf6aacea5c68f4b30f02 Mon Sep 17 00:00:00 2001
From: Justin Bogner <mail at justinbogner.com>
Date: Wed, 8 Oct 2025 11:39:58 -0700
Subject: [PATCH] [DirectX] Update DXILBitcodeWriter for #162255

Fix the build with the DirectX backend enabled by using `getUnversionedName()`
to match the updates of other similar uses of `getSourceLanguage()`.
---
 llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp b/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
index bc1a3a7995bda..82c43ff8dc352 100644
--- a/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
+++ b/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
@@ -1507,7 +1507,7 @@ void DXILBitcodeWriter::writeDICompileUnit(const DICompileUnit *N,
                                            SmallVectorImpl<uint64_t> &Record,
                                            unsigned Abbrev) {
   Record.push_back(N->isDistinct());
-  Record.push_back(N->getSourceLanguage());
+  Record.push_back(N->getSourceLanguage().getUnversionedName());
   Record.push_back(VE.getMetadataOrNullID(N->getFile()));
   Record.push_back(VE.getMetadataOrNullID(N->getRawProducer()));
   Record.push_back(N->isOptimized());



More information about the llvm-commits mailing list