[llvm] [llvm-objcopy] Report unsupported formats before compression (PR #202357)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 01:14:22 PDT 2026
================
@@ -1,5 +1,7 @@
# UNSUPPORTED: zstd
# RUN: yaml2obj %p/Inputs/compress-debug-sections.yaml -o %t
-# RUN: not llvm-objcopy --compress-sections '.debug_foo=zstd' %t /dev/null 2>&1 | FileCheck %s -DFILE=%t
+# RUN: not llvm-objcopy --compress-sections '.debug_foo=zstd' %t /dev/null 2>&1 | FileCheck %s -DFILE=%t --check-prefix=CHECK1
+# RUN: not llvm-objcopy --compress-debug-sections=zstd %t /dev/null 2>&1 | FileCheck %s -DFILE=%t --check-prefix=CHECK2
-# CHECK: error: '[[FILE]]': failed to compress section '.debug_foo': LLVM was not built with LLVM_ENABLE_ZSTD or did not find zstd at build time
+# CHECK1: error: '[[FILE]]': failed to compress section '.debug_foo': LLVM was not built with LLVM_ENABLE_ZSTD or did not find zstd at build time
+# CHECK2: error: '[[FILE]]': failed to compress section '.debug_foo': LLVM was not built with LLVM_ENABLE_ZSTD or did not find zstd at build time
----------------
jh7370 wrote:
As the messages are the same, you can reuse the same CHECK line. Just change CHECK1 -> CHECK2, delete the CHECK2 line, and drop the `--check-prefix` option from both FileCheck commands.
Same applies in other cases.
https://github.com/llvm/llvm-project/pull/202357
More information about the llvm-commits
mailing list