[llvm] [objdump] Fix dxcontainer tests on big endian host (PR #163427)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 14 10:33:36 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-directx

Author: Chris B (llvm-beanz)

<details>
<summary>Changes</summary>

This fixes a build regression on big endian systems introduced in ../llvm/test/tools/llvm-objcopy/DXContainer/dump-section.yaml

---
Full diff: https://github.com/llvm/llvm-project/pull/163427.diff


1 Files Affected:

- (modified) llvm/test/tools/llvm-objcopy/DXContainer/dump-section.yaml (+3-3) 


``````````diff
diff --git a/llvm/test/tools/llvm-objcopy/DXContainer/dump-section.yaml b/llvm/test/tools/llvm-objcopy/DXContainer/dump-section.yaml
index 6f1ecb96929cd..48773269724a4 100644
--- a/llvm/test/tools/llvm-objcopy/DXContainer/dump-section.yaml
+++ b/llvm/test/tools/llvm-objcopy/DXContainer/dump-section.yaml
@@ -11,7 +11,7 @@
 ## Dump the PSV0 part and verify its size.
 # RUN: llvm-objcopy --dump-section=PSV0=%t.psv0 %t.dxbc
 # RUN: wc -c %t.psv0 | FileCheck %s --check-prefix=PSV0-SIZE
-# RUN: od -h %t.psv0 | FileCheck %s --check-prefix=PSV0-CONTENTS
+# RUN: od -v -Ax -t x1 %t.psv0 | FileCheck %s --check-prefix=PSV0-CONTENTS
 # PSV0-SIZE: 76
 
 # For a compute shader the structure size is encoded followed by a bunch of 00'd
@@ -20,8 +20,8 @@
 # TODO: Update this test to use objdump or obj2yaml once we support
 # --add-section in objcopy. See issue:
 # https://github.com/llvm/llvm-project/issues/162159.
-# PSV0-CONTENTS: 0000000      0034    0000    0000    0000    0000    0000    0000    0000
-# PSV0-CONTENTS: 0000020      0000    0000    0000    0000    ffff    ffff    0005    0000
+# PSV0-CONTENTS: 0000000 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+# PSV0-CONTENTS: 0000010 00 00 00 00 00 00 00 00 ff ff ff ff 05 00 00 00
 
 --- !dxcontainer
 Header:

``````````

</details>


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


More information about the llvm-commits mailing list