diff --git a/docs/CommandLine.html b/docs/CommandLine.html index f12525b263e..308f1c66bbc 100644 --- a/docs/CommandLine.html +++ b/docs/CommandLine.html @@ -15,6 +15,7 @@
- #include "Support/CommandLine.h" + #include "CommandLine.h"
Additionally, you need to add this as the first line of your main program:
@@ -324,6 +325,31 @@ This defines a variable that is conceptually of the type "vector<enum Opt
... to iterate through the list of options specified.
+
+
+
+
+
+
+
+Parsing a list of non-options
+
+
+Often times it is convenient to have a "left over bin", that collects arguments that couldn't be parsed any other way. For me, this typically occurs when I am writing a utility that takes a list of filenames to work on... a linker for example. Each of these filenames isn't exactly a command line option, but we'd like for them to be parsed in a useful way. To do this, we use the "cl::StringList" class.
+...
+cl::StringList InputFilenames("", "Load
+ +This variable works just like a "vector<string>" object. As such, iteration is simple:
+ +
+ for (unsigned i = 0; i < InputFilenames.size(); ++i) + cout << "Found an argument: " << InputFilenames[i] << endl; +
+ +
Reference Guide @@ -339,8 +365,8 @@ Reference Guide: TODO |