X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FCommandLine.html;h=a418dcba45ded61eea2ebb7b52d71b4e5e17c218;hb=294fab1d079ef8dbcadcf2782b22ffdd0c849a81;hp=abc6eb6823eedf014a813d28656beccfe0a1f36b;hpb=589a4cc0f315672fc54fdfd85ef9d65e4a1b2606;p=oota-llvm.git diff --git a/docs/CommandLine.html b/docs/CommandLine.html index abc6eb6823e..a418dcba45d 100644 --- a/docs/CommandLine.html +++ b/docs/CommandLine.html @@ -42,6 +42,8 @@
+by the default constructor for the type. Warning: If you specify both +cl::init and cl::location for an option, +you must specify cl::location first, so that when the +command-line parser sees cl::init, it knows where to put the +initial value. (You will get an error at runtime if you don't put them in +the right order.)
+ +
+ +It takes three parameters: first, the name of the program (since argv +may not be available, it can't just look in argv[0]), second, +the name of the environment variable to examine, and third, the optional +additional extra text to emit when the +--help option is invoked.
+ +cl::ParseEnvironmentOptions will break the environment +variable's value up into words and then process them using +cl::ParseCommandLineOptions. +Note: Currently cl::ParseEnvironmentOptions does not support +quoting, so an environment variable containing -option "foo bar" will +be parsed as three words, -option, "foo, and bar", +which is different from what you would get from the shell with the same +input.
+
doesn't work if your fundemental data type is something that is already supported.
-
This approach works well in situations where you would line to parse an