[PATCH] D57874: [WebAssembly] Make thread-related options consistent

Thomas Lively via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 8 13:12:54 PST 2019


tlively added inline comments.


================
Comment at: lib/Driver/ToolChains/WebAssembly.cpp:66
+    if (Args.hasFlag(clang::driver::options::OPT_pthread,
+                     clang::driver::options::OPT_no_pthread),
+        false)
----------------
sbc100 wrote:
> aheejin wrote:
> > This code is not strictly related, but `hasFlag` is better than `hasArg` when there are both positive and negative versions of an option exist.
> Hmm.. there are currently no other references to OPT_no_pthread in the whole codebase.   Maybe better to simply remove the option?
> 
> I wouldn't want to commit this as that first use of the option as it might make it hard to remove :)
I think commands generally come in pairs to make it possible to override previous settings by appending args to command lines. Counting uses of OPT_no_pthread without including uses of OP_pthread doesn't make much sense.


Repository:
  rC Clang

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

https://reviews.llvm.org/D57874





More information about the cfe-commits mailing list