diff options
author | Chad Rosier <mcrosier@apple.com> | 2011-08-02 17:58:04 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2011-08-02 17:58:04 +0000 |
commit | be10f9853c638c609137c1f5a3256acb742b2eae (patch) | |
tree | aaf1a6a4f67dbfea32948e829a07e3c062d58320 /clang/lib/Driver/ArgList.cpp | |
parent | db1c9e3226abc139bc6ace74f36955a3c05bcaf3 (diff) | |
download | bcm5719-llvm-be10f9853c638c609137c1f5a3256acb742b2eae.tar.gz bcm5719-llvm-be10f9853c638c609137c1f5a3256acb742b2eae.zip |
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.
rdar://9575623
llvm-svn: 136702
Diffstat (limited to 'clang/lib/Driver/ArgList.cpp')
-rw-r--r-- | clang/lib/Driver/ArgList.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/lib/Driver/ArgList.cpp b/clang/lib/Driver/ArgList.cpp index 86da885a409..e5341884eec 100644 --- a/clang/lib/Driver/ArgList.cpp +++ b/clang/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 Twine &T) const { llvm::SmallString<256> Str; T.toVector(Str); |