[PATCH] D62264: [CommandLine] WIP: Add new debug_opt that reduces down to size of DataType in Release builds.

Don Hinton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 11:20:51 PDT 2019


hintonda marked 2 inline comments as done.
hintonda added inline comments.


================
Comment at: llvm/include/llvm/Support/CommandLine.h:411
 
-  void apply(Option &O) const { O.setDescription(Desc); }
+  template<class Opt>
+  void apply(Opt &O) const { O.setDescription(Desc); }
----------------
Templatizing these methods is needed, but could go in its own patch.  It seems some were and some weren't, but all are needed to use `debug_opt`.


================
Comment at: llvm/lib/Support/Signals.cpp:42
 static bool DisableSymbolicationFlag = false;
-static cl::opt<bool, true>
+static cl::debug_opt<bool, true>
     DisableSymbolication("disable-symbolication",
----------------
This was added as an example usage in real code, but doesn't need to be included in this patch if and when lands.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62264





More information about the llvm-commits mailing list