[llvm] [ObjCopy][DX] Support for -dump-section flag (PR #159999)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 30 10:24:57 PDT 2025
================
@@ -0,0 +1,26 @@
+# RUN: yaml2obj %s -o %t.dxbc
+# RUN: not llvm-objcopy --dump-section=FKE0=%t.fek0 %t.dxbc 2>&1 | FileCheck %s --check-prefix=CHECK-EMPTY
+# RUN: not llvm-objcopy --dump-section=FKE3=%t.fek1 %t.dxbc 2>&1 | FileCheck %s --check-prefix=CHECK-MISSING
+# RUN: not llvm-objcopy --dump-section=FKE2=%t/does_not_exist/.fek2 %t.dxbc 2>&1 | FileCheck %s --check-prefix=CHECK-BAD-PATH
+
+# CHECK-EMPTY: error: {{.*}}: part 'FKE0' is empty
+# CHECK-MISSING: error: {{.*}}: part 'FKE3' not found
+# CHECK-BAD-PATH: error: {{.*}}: No such file or directory
----------------
jh7370 wrote:
This should use the lit substitution for the corresponding error message type, since the message is platform-specific (the test currently fails on Windows). I believe the substitution you'll need is `%errc_ENOENT` (which you should combine with FileCheck's -D option, similar to above).
https://github.com/llvm/llvm-project/pull/159999
More information about the llvm-commits
mailing list