X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FCommandLine.html;h=47ab2cc074dda4aa8ab4be56e522a014a9e71460;hb=a75ce9f5d2236d93c117e861e60e6f3f748c9555;hp=67177bfa6feda47f711acfb1713ce300129744c4;hpb=8b44b9064427821ba2784ff3617d7cc5460df5de;p=oota-llvm.git diff --git a/docs/CommandLine.html b/docs/CommandLine.html index 67177bfa6fe..47ab2cc074d 100644 --- a/docs/CommandLine.html +++ b/docs/CommandLine.html @@ -44,7 +44,7 @@
  • Option Modifiers
  • Top-Level Classes and Functions @@ -1164,13 +1175,13 @@ that does not support it.
  • Option modifiers are the flags and expressions that you pass into the constructors for cl::opt and cl::list. These modifiers give you the ability to -tweak how options are parsed and how --help output is generated to fit +tweak how options are parsed and how -help output is generated to fit your application well.

    -

    These options fall into five main catagories:

    +

    These options fall into five main categories:

      -
    1. Hiding an option from --help output
    2. +
    3. Hiding an option from -help output
    4. Controlling the number of occurrences required and allowed
    5. Controlling whether or not a value must be @@ -1179,9 +1190,9 @@ your application well.

    6. Miscellaneous option modifiers
    -

    It is not possible to specify two options from the same catagory (you'll get +

    It is not possible to specify two options from the same category (you'll get a runtime error) to a single option, except for options in the miscellaneous -catagory. The CommandLine library specifies defaults for all of these settings +category. The CommandLine library specifies defaults for all of these settings that are the most useful in practice and the most common, which mean that you usually shouldn't have to worry about these.

    @@ -1189,14 +1200,14 @@ usually shouldn't have to worry about these.

    - Hiding an option from --help output + Hiding an option from -help output

    The cl::NotHidden, cl::Hidden, and cl::ReallyHidden modifiers are used to control whether or not an option -appears in the --help and --help-hidden output for the +appears in the -help and -help-hidden output for the compiled program:

    -

    So far, these are the only two miscellaneous option modifiers.

    +

    So far, these are the only three miscellaneous option modifiers.

    + +
    + + +
    + Response files +
    + +
    + +

    Some systems, such as certain variants of Microsoft Windows and +some older Unices have a relatively low limit on command-line +length. It is therefore customary to use the so-called 'response +files' to circumvent this restriction. These files are mentioned on +the command-line (using the "@file") syntax. The program reads these +files and inserts the contents into argv, thereby working around the +command-line length limits. Response files are enabled by an optional +fourth argument to +cl::ParseEnvironmentOptions +and +cl::ParseCommandLineOptions. +

    +
    Top-Level Classes and Functions @@ -1467,7 +1508,8 @@ available.

    The cl::ParseCommandLineOptions function requires two parameters (argc and argv), but may also take an optional third parameter which holds additional extra text to emit when the ---help option is invoked.

    +-help option is invoked, and a fourth boolean parameter that enables +response files.

    @@ -1489,11 +1531,13 @@ like cl::ParseCommandLineOptions does.

    -

    It takes three parameters: the name of the program (since argv may +

    It takes four parameters: the name of the program (since argv may not be available, it can't just look in argv[0]), the name of the -environment variable to examine, and the optional +environment variable to examine, the optional additional extra text to emit when the ---help option is invoked.

    +-help option is invoked, and the boolean +switch that controls whether response files +should be read.

    cl::ParseEnvironmentOptions will break the environment variable's value up into words and then process them using @@ -1645,7 +1689,7 @@ the conversion from string to data.

    The cl::extrahelp class is a nontemplated class that allows extra -help text to be printed out for the --help option.

    +help text to be printed out for the -help option.

     namespace cl {
    @@ -1653,7 +1697,7 @@ help text to be printed out for the --help option.

    }
    -

    To use the extrahelp, simply construct one with a const char* +

    To use the extrahelp, simply construct one with a const char* parameter to the constructor. The text passed to the constructor will be printed at the bottom of the help message, verbatim. Note that multiple cl::extrahelp can be used, but this practice is discouraged. If @@ -1822,7 +1866,7 @@ our example, we implement parse as:

    const std::string &Arg, unsigned &Val) { const char *ArgStart = Arg.c_str(); char *End; - + // Parse integer part, leaving 'End' pointing to the first non-integer char Val = (unsigned)strtol(ArgStart, &End, 0); @@ -1839,7 +1883,7 @@ our example, we implement parse as:

    default: // Print an error message if unrecognized character! - return O.error(": '" + Arg + "' value invalid for file size argument!"); + return O.error("'" + Arg + "' value invalid for file size argument!"); } } } @@ -1862,7 +1906,7 @@ MFS("max-file-size", cl::desc("Maximum file si
     OPTIONS:
    -  -help                 - display available options (--help-hidden for more)
    +  -help                 - display available options (-help-hidden for more)
       ...
       -max-file-size=<size> - Maximum file size to accept
     
    @@ -1922,9 +1966,9 @@ tutorial.


    Valid CSS! + src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"> Valid HTML 4.01! + src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> Chris Lattner
    LLVM Compiler Infrastructure