[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:08 PDT 2025


================
@@ -0,0 +1,57 @@
+## Tests that a separate DXContainer is created with only the specified section
+## for each --split-section specified. Also ensure that the part is removed
+## from the original object.
+
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-objcopy %t --split-section=FKE1=%t.fke1.out --split-section=FKE4=%t.fke4.out
+# RUN: obj2yaml %t | FileCheck %s --check-prefix=ORIG
+# RUN: obj2yaml %t.fke1.out | FileCheck %s --check-prefixes=CHECK,FKE1
+# RUN: obj2yaml %t.fke4.out | FileCheck %s --check-prefixes=CHECK,FKE4
+
+--- !dxcontainer
+Header:
+  Hash:            [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+                     0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]
+  Version:
+    Major:           1
+    Minor:           0
+## FKE1: FileSize:       52
----------------
hekota wrote:

All of these checks should have just a single `#`.

https://github.com/llvm/llvm-project/pull/153265


More information about the llvm-branch-commits mailing list