зеркало из https://github.com/microsoft/clang-1.git
Driver: Add ArgList::{append, getArgString}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66089 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
fb36caee24
Коммит
9358dc8d1e
|
@ -48,6 +48,12 @@ namespace driver {
|
|||
|
||||
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
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "clang/Driver/ArgList.h"
|
||||
#include "clang/Driver/Arg.h"
|
||||
#include "clang/Driver/Option.h"
|
||||
|
||||
using namespace clang::driver;
|
||||
|
||||
|
@ -20,3 +21,11 @@ ArgList::~ArgList() {
|
|||
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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче