[llvm] [llvm-size] Add -z option for Mach-O to exclude __PAGEZERO size. (PR #159574)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 23 01:59:25 PDT 2025
================
@@ -0,0 +1,60 @@
+# Test the -z option to skip __PAGEZERO segment in Mach-O files
+
+# RUN: yaml2obj %s --docnum=1 -o %t-pagezero.o
+# RUN: llvm-size %t-pagezero.o | \
+# RUN: FileCheck %s --check-prefix=NORMAL --match-full-lines \
+# RUN: --strict-whitespace --implicit-check-not={{.}}
+# RUN: llvm-size -z %t-pagezero.o | \
+# RUN: FileCheck %s --check-prefix=SKIP --match-full-lines \
+# RUN: --strict-whitespace --implicit-check-not={{.}}
----------------
jh7370 wrote:
As this test isn't about the format of the output, you can get away with omitting the `--strict-whitespace` and `--implicit-check-not` options. You might want to keep `--match-full-lines`, so that you don't accidentally miss a leading/trailing digit in the first/last number.
https://github.com/llvm/llvm-project/pull/159574
More information about the llvm-commits
mailing list