[llvm] [objcopy] Return an error in case of an invalid regex (PR #74319)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 01:00:54 PST 2023


================
@@ -0,0 +1,20 @@
+## Test if providing objcopy with an invalid regex generates an error.
+
+# RUN: yaml2obj %s -o %t
+
+# RUN: not llvm-objcopy --regex --strip-symbol='f[^)' %t /dev/null 2>&1 | FileCheck %s
+# CHECK: cannot compile regular expression
+
+!ELF
+FileHeader:
+  Class:   ELFCLASS64
+  Data:    ELFDATA2LSB
+  Type:    ET_EXEC
+  Machine: EM_X86_64
----------------
jh7370 wrote:

I believe you can omit everything from here downwards to make it more minimal.

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


More information about the llvm-commits mailing list