[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:56 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
----------------
jh7370 wrote:
Let's explicitly match the file name (use `-DFILE=...` in the FileCheck command and `[[FILE]]` here, or equivalent): we've had problems in the past with --dump-section for other formats resulting in the wrong file name being used in error messages.
https://github.com/llvm/llvm-project/pull/159999
More information about the llvm-commits
mailing list