[llvm-branch-commits] [llvm] [DirectX] Add `split-section` to `llvm-objcopy` and implement it for `DXContainer` (PR #153265)
Helena Kotas via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Aug 13 15:42:10 PDT 2025
================
@@ -0,0 +1,309 @@
+## Tests that a separate DXContainer is created for the RTS0 (root signature)
+## part, specified with --split-section. Also ensure that the part is removed
+## from the original object.
+
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-objcopy %t --split-section=RTS0=%t.out
+# RUN: obj2yaml %t | FileCheck %s --check-prefix=ORIG
+# RUN: obj2yaml %t.out | FileCheck %s
+
+## The DXContainer described below was generated with:
+
+## `clang-dxc -T cs_6_7 test.hlsl /Fo temp.dxo`
+## `obj2yaml temp.dxo`
+
+## ``` test.hlsl
+## [RootSignature("")]
+## [numthreads(1,1,1)]
+## void main() {}
+## ```
+
+--- !dxcontainer
+Header:
+ Hash: [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]
+ Version:
+ Major: 1
+ Minor: 0
+## CHECK: FileSize: 68
----------------
hekota wrote:
Same here, needs just a single `#` for the checks. Also consider checking the FileSize for ORIG.
https://github.com/llvm/llvm-project/pull/153265
More information about the llvm-branch-commits
mailing list