const_iterator begin() const { return Args.begin(); }
const_iterator end() const { return Args.end(); }
+
+ /// append - Append \arg A to the arg list, taking ownership.
+ void append(Arg *A);
+
+ /// getArgString - Return the input argument string at \arg Index.
+ const char *getArgString(unsigned Index) const { return ArgStrings[Index]; }
};
} // end namespace driver
} // end namespace clang
#include "clang/Driver/ArgList.h"
#include "clang/Driver/Arg.h"
+#include "clang/Driver/Option.h"
using namespace clang::driver;
for (iterator it = begin(), ie = end(); it != ie; ++ie)
delete *it;
}
+
+void ArgList::append(Arg *A) {
+ if (A->getOption().isUnsupported()) {
+ assert(0 && "FIXME: unsupported unsupported.");
+ }
+
+ Args.push_back(A);
+}