Return true on success in cl::ExpandResponseFiles
authorReid Kleckner <reid@kleckner.net>
Tue, 3 Dec 2013 19:13:18 +0000 (19:13 +0000)
committerReid Kleckner <reid@kleckner.net>
Tue, 3 Dec 2013 19:13:18 +0000 (19:13 +0000)
This fixes a logic bug pointed out by Juraj Ivancic.

No behavior change because none of the in-tree clients of
cl::ExpandResponseFiles check the return value.  In this case, the
@prefixed arguments are left in the command line.  Downstream command
line processing has the opportunity to emit errors about it, so this
isn't that bad.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196306 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/CommandLine.cpp

index 44a88d81e3a0a1e4ec7be4980372debee977b183..9acaa08bbcc7a4572f7b0e7e9a826d71154c7b15 100644 (file)
@@ -634,7 +634,7 @@ static bool ExpandResponseFile(const char *FName, StringSaver &Saver,
 bool cl::ExpandResponseFiles(StringSaver &Saver, TokenizerCallback Tokenizer,
                              SmallVectorImpl<const char *> &Argv) {
   unsigned RspFiles = 0;
-  bool AllExpanded = false;
+  bool AllExpanded = true;
 
   // Don't cache Argv.size() because it can change.
   for (unsigned I = 0; I != Argv.size(); ) {