[PATCH] D110904: [lld-macho] Check for errors when the response file doesn't exist.

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 1 07:28:19 PDT 2021


thakis added a comment.

Oh, I see that function is new. Probably should do this for all ports in this CL then if you think this is worth doing.



================
Comment at: lld/MachO/DriverUtils.cpp:86
   // and then parse the argument again.
-  cl::ExpandResponseFiles(saver, cl::TokenizeGNUCommandLine, vec);
+  if (llvm::Error Err = cl::ExpandResponseFilesWithError(
+          saver, cl::TokenizeGNUCommandLine, vec,
----------------
I see this is a new function. Since this will be the only caller, can we add only the arguments we need, so that we don't have to pass all these default args?


================
Comment at: lld/MachO/DriverUtils.cpp:91
+          /*CurrentDir=*/llvm::None, *llvm::vfs::getRealFileSystem()))
+    handleAllErrors(std::move(Err), [&](ErrorInfoBase &EIB) {
+      error("Error expanding response file: " + Twine(EIB.message()));
----------------
Can we use `checkError()` instead?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110904



More information about the llvm-commits mailing list