[PATCH] D70769: [Support] add vfs support for ExpandResponseFiles

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 28 02:41:31 PST 2019


kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.

LGTM, please make sure you've clang-formatted the changes though



================
Comment at: llvm/lib/Support/CommandLine.cpp:1054
+  llvm::ErrorOr<std::string> CurrDirOrErr = FS.getCurrentWorkingDirectory();
+  if (!CurrDirOrErr) {
+    return llvm::errorCodeToError(CurrDirOrErr.getError());
----------------
nit: no need for braces


================
Comment at: llvm/lib/Support/CommandLine.cpp:1059
+      FS.getBufferForFile(FName);
+  if (!MemBufOrErr) {
+    return llvm::errorCodeToError(MemBufOrErr.getError());
----------------
nit: no need for braces


================
Comment at: llvm/lib/Support/CommandLine.cpp:1178
+
+    if (llvm::Error Err = ExpandResponseFile(FName, Saver, Tokenizer, ExpandedArgv, MarkEOLs,
+                            RelativeNames, FS)) {
----------------
clang-format ?


================
Comment at: llvm/lib/Support/CommandLine.cpp:1070
     if (!convertUTF16ToUTF8String(BufRef, UTF8Buf))
-      return false;
+      return llvm::make_error<llvm::StringError>(
+          "Could not convert UTF16 To UTF8", llvm::inconvertibleErrorCode());
----------------
nit: you can make use of `llvm::createStringError` instead


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70769





More information about the cfe-commits mailing list