[PATCH] D60933: [CommandLine] Provide parser<unsigned long> instantiation to allow cl::opt<uint64_t> on LP64 platforms

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 18:03:55 PDT 2019


MaskRay marked 3 inline comments as done.
MaskRay added inline comments.


================
Comment at: include/llvm/Support/CommandLine.h:1012
   // getValueName - Overload in subclass to provide a better default value.
-  StringRef getValueName() const override { return "uint"; }
+  StringRef getValueName() const override { return "ullong"; }
 
----------------
yln wrote:
> 
> Is this the "data type" or just the "kind" of the value? I am asking because float/double are just labeled "number".
> 
> Where is this string used? Is it included in the user error message on parse error?
It used in the `-help` message, e.g. `-instcombine-max-num-phis=<uint>`. It is also included in the error message when the parsing fails, e.g. ` return O.error("'" + Arg + "' value invalid for ulong argument!");
`


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60933





More information about the llvm-commits mailing list