[llvm] [DirectX][ObjectYAML] Fix GCC name conflict in DXContainerYAML.h (PR #199062)

Vladislav Dzhidzhoev via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 08:48:16 PDT 2026


https://github.com/dzhidzhoev created https://github.com/llvm/llvm-project/pull/199062

After https://github.com/llvm/llvm-project/pull/198222, GCC with `-fpermissive` reports an error:
```
llvm/include/llvm/ObjectYAML/DXContainerYAML.h:328:34: error: declaration of ‘std::optional<llvm::DXContainerYAML::CompilerVersion> llvm::DXContainerYAML::Part::CompilerVersion’ changes meaning of ‘CompilerVersion’ [-Wchanges-meaning]
  328 |   std::optional<CompilerVersion> CompilerVersion;
```

Fix that.

>From 18abbb47c093bf0d4916852a611ad48d3c3663c7 Mon Sep 17 00:00:00 2001
From: Vladislav Dzhidzhoev <vdzhidzhoev at accesssoftek.com>
Date: Thu, 21 May 2026 17:44:45 +0200
Subject: [PATCH] [DirectX][ObjectYAML] Fix GCC name conflict in
 DXContainerYAML.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

After https://github.com/llvm/llvm-project/pull/198222, GCC with
`-fpermissive` reports an error:
```
llvm/include/llvm/ObjectYAML/DXContainerYAML.h:328:34: error: declaration of ‘std::optional<llvm::DXContainerYAML::CompilerVersion> llvm::DXContainerYAML::Part::CompilerVersion’ changes meaning of ‘CompilerVersion’ [-Wchanges-meaning]
  328 |   std::optional<CompilerVersion> CompilerVersion;
```

Fix that.
---
 llvm/include/llvm/ObjectYAML/DXContainerYAML.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/include/llvm/ObjectYAML/DXContainerYAML.h b/llvm/include/llvm/ObjectYAML/DXContainerYAML.h
index 82409b68d409a..71fc1774e672d 100644
--- a/llvm/include/llvm/ObjectYAML/DXContainerYAML.h
+++ b/llvm/include/llvm/ObjectYAML/DXContainerYAML.h
@@ -325,7 +325,7 @@ struct Part {
   std::optional<DXContainerYAML::Signature> Signature;
   std::optional<DXContainerYAML::RootSignatureYamlDesc> RootSignature;
   std::optional<DXContainerYAML::DebugName> DebugName;
-  std::optional<CompilerVersion> CompilerVersion;
+  std::optional<DXContainerYAML::CompilerVersion> CompilerVersion;
 };
 
 struct Object {



More information about the llvm-commits mailing list