[PATCH] D60631: [Support] Fix recursive response file expansion guard

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 14:30:39 PDT 2019


smeenai marked 2 inline comments as done.
smeenai added inline comments.


================
Comment at: llvm/lib/Support/CommandLine.cpp:1041
       continue;
+    } else {
+      ++ExpandedRspFiles;
----------------
hans wrote:
> How about getting rid of the negation in the if statement and instead doing:
> 
> ```
> if (ExpandResponseFile(..) {
>   ++ExpandedRspFiles;
> } else {
>   // We couldn't read this file ...
> }
> ```
Sure.


================
Comment at: llvm/unittests/Support/CommandLineTest.cpp:773
+  std::string ResponseFileRef = std::string("@") + ResponseFilePath.c_str();
+  Argv.emplace_back(ResponseFileRef.c_str());
+
----------------
hans wrote:
> would push_back work instead? seems simpler
Yep.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60631/new/

https://reviews.llvm.org/D60631





More information about the llvm-commits mailing list