Page MenuHomePhabricator

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

Authored by MaskRay on Apr 19 2019, 9:08 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

MaskRay created this revision.Apr 19 2019, 9:08 PM
yln marked an inline comment as done.Apr 22 2019, 9:58 AM
yln added inline comments.
include/llvm/Support/CommandLine.h
1012 ↗(On Diff #195961)

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?

lib/Support/CommandLine.cpp
1674 ↗(On Diff #195961)

uint used here, but not above.
Best would probably be to use the exact data type everywhere (+ existing parsers)

lib/Support/RandomNumberGenerator.cpp
30 ↗(On Diff #195961)

Thanks! Fixing a 5 year old issue. I am delighted! :)

MaskRay marked 3 inline comments as done.Apr 22 2019, 6:02 PM
MaskRay added inline comments.
include/llvm/Support/CommandLine.h
1012 ↗(On Diff #195961)

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!");
`

MaskRay updated this revision to Diff 196162.Apr 22 2019, 6:03 PM
MaskRay marked an inline comment as done.

Rebase and make a drive-by fix uint -> ulong

yln accepted this revision.Apr 23 2019, 10:31 AM

thanks!

This revision is now accepted and ready to land.Apr 23 2019, 10:31 AM
This revision was automatically updated to reflect the committed changes.