diff options
author | Chad Rosier <mcrosier@apple.com> | 2011-07-20 20:26:32 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2011-07-20 20:26:32 +0000 |
commit | 2da13b15959365df7edf1ed12a049b599b39c276 (patch) | |
tree | 9ae0d63ccefc306b330032a070310175e4589f70 /lib/Driver/ArgList.cpp | |
parent | 66488ed140f00daee0c3f0370bac337819ee8bc0 (diff) |
When the compiler crashes, the compiler driver now produces diagnostic information
including the fully preprocessed source file(s) and command line arguments. The
developer is asked to attach this diagnostic information to a bug report.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ArgList.cpp')
-rw-r--r-- | lib/Driver/ArgList.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Driver/ArgList.cpp b/lib/Driver/ArgList.cpp index b8af9cc47e..30225fccb5 100644 --- a/lib/Driver/ArgList.cpp +++ b/lib/Driver/ArgList.cpp @@ -46,6 +46,16 @@ void ArgList::append(Arg *A) { Args.push_back(A); } +void ArgList::eraseArg(OptSpecifier Id) { + for (iterator it = begin(), ie = end(); it != ie; ++it) { + if ((*it)->getOption().matches(Id)) { + Args.erase(it); + it = begin(); + ie = end(); + } + } +} + Arg *ArgList::getLastArgNoClaim(OptSpecifier Id) const { // FIXME: Make search efficient? for (const_reverse_iterator it = rbegin(), ie = rend(); it != ie; ++it) @@ -192,6 +202,12 @@ void ArgList::ClaimAllArgs(OptSpecifier Id0) const { (*it)->claim(); } +void ArgList::ClaimAllArgs() const { + for (const_iterator it = begin(), ie = end(); it != ie; ++it) + if (!(*it)->isClaimed()) + (*it)->claim(); +} + const char *ArgList::MakeArgString(const llvm::Twine &T) const { llvm::SmallString<256> Str; T.toVector(Str); |