[PATCH] D34440: [Clang] Expand response files before loading compilation database

Vladimir Plyashkun via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 13 09:00:50 PDT 2017


vladimir.plyashkun added inline comments.


================
Comment at: unittests/Tooling/CompilationDatabaseTest.cpp:638-652
+  ParseCompilationDatabaseFromResponseFileTest() {
+    std::error_code EC = llvm::sys::fs::createUniqueDirectory("unittest", TestDir);
+    EXPECT_TRUE(!EC);
+    llvm::sys::path::append(ResponseFileName, TestDir, "resp");
+  }
+  void setResponseFileContent(const std::string &content) {
+    std::ofstream File(ResponseFileName.c_str());
----------------
alexfh wrote:
> Can we do all this in the virtual file system (include/clang/Basic/VirtualFileSystem.h) to avoid creating files from the unit test?
Unfortunately, i don't see any options how to do it with VFS. 
All other tests related with response files expansion don't use VFS for some reasons, e.g. `unittests/Support/CommandLineTest.cpp`


Repository:
  rL LLVM

https://reviews.llvm.org/D34440





More information about the cfe-commits mailing list