[PATCH] D124143: [lld-macho] Allow dead_strip to work with autohide symbols that cannot be exported

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 13:33:58 PDT 2022


int3 added inline comments.


================
Comment at: lld/test/MachO/export-options.s:148-149
+# RUN: %no-fatal-warnings-lld -dylib -exported_symbol "_foo" %t/autohide-private-extern.o \
+# RUN:   -dead_strip -o %t/no_crash
+# RUN: llvm-nm -m %t/no_crash | FileCheck %s --check-prefix=NO-CRASH
+
----------------
int3 wrote:
> it's better to describe what the test should cover (`exported-hidden`) rather than what it shouldn't do (`no_crash`). (The comment itself can note that this used to crash.)
> 
> let's also mention explicitly that we expect `_foo` to be treated as a liveness root due to `-exported_symbol`
> 
> also nit: use hyphens instead of underscores for the file names
or maybe `AUTOHIDE-PRIVATE-DEAD-STRIP` to make it clear that it's an extension to the `AUTOHIDE-PRIVATE` cases above


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124143/new/

https://reviews.llvm.org/D124143



More information about the llvm-commits mailing list