klimek added inline comments.
================ Comment at: include/clang/Frontend/PrecompiledPreamble.h:99 /// Changes options inside \p CI to use PCH from this preamble. Also remaps - /// main file to \p MainFileBuffer. + /// main file to \p MainFileBuffer and updates \p VFS to ensure preamble is + /// accessible. ---------------- ...ensure *the* preamble... ================ Comment at: lib/Frontend/ASTUnit.cpp:1028 + IntrusiveRefCntPtr<vfs::FileSystem> OldVFS = VFS; + Preamble->AddImplicitPreamble(*CCInvocation, /*ref*/ VFS, + OverrideMainBuffer.get()); ---------------- Since when are we using the /*ref*/ annotation? ================ Comment at: lib/Frontend/PrecompiledPreamble.cpp:206 + std::unique_ptr<std::string> Storage; + if (InMemStorage) { + OS = llvm::make_unique<llvm::raw_string_ostream>(*InMemStorage); ---------------- It looks like we should pass in the output stream, not the storage? ================ Comment at: lib/Frontend/PrecompiledPreamble.cpp:490 PreprocessorOpts.DisablePCHValidation = true; + if (Storage.getKind() == PCHStorage::Kind::TempFile) { + const TempPCHFile &PCHFile = Storage.asFile(); ---------------- This looks a bit like we should push it into the PCHStorage. https://reviews.llvm.org/D39842 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits