[PATCH] D39000: [ELF] - Implement --orphan-handling option.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 25 07:55:27 PDT 2017
ruiu added inline comments.
================
Comment at: test/ELF/linkerscript/orphan-report.s:46-48
+# RUN: not ld.lld --orphan-handling=discard -o %t.out --script %t.script %t.o 2>&1 \
+# RUN: | FileCheck %s --check-prefix=UNKNOWN
+# UNKNOWN: unknown --orphan-handling mode: discard
----------------
grimar wrote:
> ruiu wrote:
> > In general, when you give a bogus value, you should give a value that is obviously bogus, because it conveys your meaning better. Instead of "discard", pass "foo", for example. This comment applies to other patches.
> I passed "discard" here intentionally to document that we do not support this mode explicitly.
> I can change to "foo" case as well, but I supposed "discard" case is useful itself.
I don't think I agree. Testing that something is not supported seems a bit odd... Unit tests are to make sure that all your existing features are still working fine, but this test doesn't work for that purpose. We can, for example, add tests to make sure that some Solaris linker options are not supported in lld, but do we want to add such tests? I think the answer is no, because, it doesn't make sense as tests.
https://reviews.llvm.org/D39000
More information about the llvm-commits
mailing list