[llvm] [DirectX] Add `extract-section` to `llvm-objcopy` and implement it for `DXContainer` (PR #154804)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 4 02:14:12 PDT 2025
================
@@ -0,0 +1,56 @@
+## Tests that a separate DXContainer is created with only the specified section
+## for each --extract-section specified
+
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-objcopy %t --extract-section=FKE1=%t.fke1.out --extract-section=FKE4=%t.fke4.out
+# 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
----------------
jh7370 wrote:
Similar comments to above. I'd move the CHECKs out of the YAML. (You don't need to do the full detail testing that I suggested otherwise though).
https://github.com/llvm/llvm-project/pull/154804
More information about the llvm-commits
mailing list