diff options
author | Justin Bogner <mail@justinbogner.com> | 2013-12-06 22:56:19 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2013-12-06 22:56:19 +0000 |
commit | 74999cfe0c35984eac653ce0d643542f24ce25a5 (patch) | |
tree | dd8ed51821067aa21d1afa5c3a474976f462a066 /lib/Support | |
parent | a2bfea97432fe5edc153f1556a6e1c8fb0e5e67c (diff) | |
download | llvm-74999cfe0c35984eac653ce0d643542f24ce25a5.tar.gz llvm-74999cfe0c35984eac653ce0d643542f24ce25a5.tar.bz2 llvm-74999cfe0c35984eac653ce0d643542f24ce25a5.tar.xz |
Support: Fix handling of args that begin with @ but aren't files
Command line arguments that begin with @ but aren't a path to an
existing file currently cause later @file arguments to be ignored.
Correctly skip over these arguments instead of trying to read a
non-existent file 20 times and giving up.
Since the problem manifests in the clang driver, the test is in that
repository.
Fixes rdar://problem/15590906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196620 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/CommandLine.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 9acaa08bbc..7ed4dead04 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -655,7 +655,10 @@ bool cl::ExpandResponseFiles(StringSaver &Saver, TokenizerCallback Tokenizer, // the cwd of the process or the response file? SmallVector<const char *, 0> ExpandedArgv; if (!ExpandResponseFile(Arg + 1, Saver, Tokenizer, ExpandedArgv)) { + // We couldn't read this file, so we leave it in the argument stream and + // move on. AllExpanded = false; + ++I; continue; } Argv.erase(Argv.begin() + I); |