<div dir="auto">I created a bug and copied the original authors. </div><div class="gmail_extra"><br><div class="gmail_quote">On 20 Mar 2017 15:58, "David Blaikie" <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">probably worth linking to the buildbot failure and replying on the original commit thread to inform the original contributor/help provide breadcrumbs to anyone else interested in that change</div><br><div class="gmail_quote"><div dir="ltr">On Sat, Mar 18, 2017 at 7:23 AM Renato Golin via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rengolin<br class="m_-2933496869566287070gmail_msg">
Date: Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
New Revision: 298185<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=298185&view=rev" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=298185&view=rev</a><br class="m_-2933496869566287070gmail_msg">
Log:<br class="m_-2933496869566287070gmail_msg">
Revert "Modules: Cache PCMs in memory and avoid a use-after-free"<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
This reverts commit r298165, as it broke the ARM builds.<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed:<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/include/clang/Basic/<wbr>MemoryBufferCache.h<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/lib/Basic/<wbr>MemoryBufferCache.cpp<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/X.h<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/Y.h<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/Z.h<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/module.map<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/test/Modules/Inputs/<wbr>warning-mismatch/Mismatch.h<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/test/Modules/Inputs/<wbr>warning-mismatch/System.h<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/test/Modules/Inputs/<wbr>warning-mismatch/module.<wbr>modulemap<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/test/Modules/<wbr>outofdate-rebuild.m<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/test/Modules/system-<wbr>out-of-date-test.m<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/test/Modules/<wbr>warning-mismatch.m<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/unittests/Basic/<wbr>MemoryBufferCacheTest.cpp<br class="m_-2933496869566287070gmail_msg">
Modified:<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/include/clang/Basic/<wbr>DiagnosticSerializationKinds.<wbr>td<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/include/clang/<wbr>Frontend/ASTUnit.h<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/include/clang/<wbr>Frontend/CompilerInstance.h<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/include/clang/Lex/<wbr>Preprocessor.h<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/include/clang/<wbr>Serialization/ASTReader.h<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/include/clang/<wbr>Serialization/ASTWriter.h<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/include/clang/<wbr>Serialization/Module.h<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/include/clang/<wbr>Serialization/ModuleManager.h<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/lib/Basic/<wbr>CMakeLists.txt<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/lib/Frontend/<wbr>ASTUnit.cpp<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/lib/Frontend/<wbr>CompilerInstance.cpp<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/lib/Lex/<wbr>Preprocessor.cpp<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/lib/Serialization/<wbr>ASTReader.cpp<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/lib/Serialization/<wbr>ASTWriter.cpp<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/lib/Serialization/<wbr>GeneratePCH.cpp<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/lib/Serialization/<wbr>ModuleManager.cpp<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/unittests/Basic/<wbr>CMakeLists.txt<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/unittests/Basic/<wbr>SourceManagerTest.cpp<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/unittests/Lex/<wbr>LexerTest.cpp<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/unittests/Lex/<wbr>PPCallbacksTest.cpp<br class="m_-2933496869566287070gmail_msg">
    cfe/trunk/unittests/Lex/<wbr>PPConditionalDirectiveRecordTe<wbr>st.cpp<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/include/clang/Basic/<wbr>DiagnosticSerializationKinds.<wbr>td<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/Basic/<wbr>DiagnosticSerializationKinds.<wbr>td?rev=298185&r1=298184&r2=<wbr>298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/include/clang/Basic/<wbr>DiagnosticSerializationKinds.<wbr>td (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/include/clang/Basic/<wbr>DiagnosticSerializationKinds.<wbr>td Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -176,11 +176,6 @@ def warn_duplicate_module_file_<wbr>extension<br class="m_-2933496869566287070gmail_msg">
   "duplicate module file extension block name '%0'">,<br class="m_-2933496869566287070gmail_msg">
   InGroup<ModuleFileExtension>;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
-def warn_module_system_bit_<wbr>conflict : Warning<<br class="m_-2933496869566287070gmail_msg">
-  "module file '%0' was validated as a system module and is now being imported "<br class="m_-2933496869566287070gmail_msg">
-  "as a non-system module; any difference in diagnostic options will be ignored">,<br class="m_-2933496869566287070gmail_msg">
-  InGroup<ModuleConflict>;<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
 } // let CategoryName<br class="m_-2933496869566287070gmail_msg">
 } // let Component<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed: cfe/trunk/include/clang/Basic/<wbr>MemoryBufferCache.h<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/MemoryBufferCache.h?rev=298184&view=auto" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/Basic/MemoryBufferCache.<wbr>h?rev=298184&view=auto</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/include/clang/Basic/<wbr>MemoryBufferCache.h (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/include/clang/Basic/<wbr>MemoryBufferCache.h (removed)<br class="m_-2933496869566287070gmail_msg">
@@ -1,80 +0,0 @@<br class="m_-2933496869566287070gmail_msg">
-//===- MemoryBufferCache.h - Cache for loaded memory buffers ----*- C++ -*-===//<br class="m_-2933496869566287070gmail_msg">
-//<br class="m_-2933496869566287070gmail_msg">
-//                     The LLVM Compiler Infrastructure<br class="m_-2933496869566287070gmail_msg">
-//<br class="m_-2933496869566287070gmail_msg">
-// This file is distributed under the University of Illinois Open Source<br class="m_-2933496869566287070gmail_msg">
-// License. See LICENSE.TXT for details.<br class="m_-2933496869566287070gmail_msg">
-//<br class="m_-2933496869566287070gmail_msg">
-//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-#ifndef LLVM_CLANG_BASIC_<wbr>MEMORYBUFFERCACHE_H<br class="m_-2933496869566287070gmail_msg">
-#define LLVM_CLANG_BASIC_<wbr>MEMORYBUFFERCACHE_H<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-#include "llvm/ADT/IntrusiveRefCntPtr.<wbr>h"<br class="m_-2933496869566287070gmail_msg">
-#include "llvm/ADT/StringMap.h"<br class="m_-2933496869566287070gmail_msg">
-#include <memory><br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-namespace llvm {<br class="m_-2933496869566287070gmail_msg">
-class MemoryBuffer;<br class="m_-2933496869566287070gmail_msg">
-} // end namespace llvm<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-namespace clang {<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-/// Manage memory buffers across multiple users.<br class="m_-2933496869566287070gmail_msg">
-///<br class="m_-2933496869566287070gmail_msg">
-/// Ensures that multiple users have a consistent view of each buffer.  This is<br class="m_-2933496869566287070gmail_msg">
-/// used by \a CompilerInstance when building PCMs to ensure that each \a<br class="m_-2933496869566287070gmail_msg">
-/// ModuleManager sees the same files.<br class="m_-2933496869566287070gmail_msg">
-///<br class="m_-2933496869566287070gmail_msg">
-/// \a finalizeCurrentBuffers() should be called before creating a new user.<br class="m_-2933496869566287070gmail_msg">
-/// This locks in the current buffers, ensuring that no buffer that has already<br class="m_-2933496869566287070gmail_msg">
-/// been accessed can be purged, preventing use-after-frees.<br class="m_-2933496869566287070gmail_msg">
-class MemoryBufferCache : public llvm::RefCountedBase<<wbr>MemoryBufferCache> {<br class="m_-2933496869566287070gmail_msg">
-  struct BufferEntry {<br class="m_-2933496869566287070gmail_msg">
-    std::unique_ptr<llvm::<wbr>MemoryBuffer> Buffer;<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-    /// Track the timeline of when this was added to the cache.<br class="m_-2933496869566287070gmail_msg">
-    unsigned Index;<br class="m_-2933496869566287070gmail_msg">
-  };<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  /// Cache of buffers.<br class="m_-2933496869566287070gmail_msg">
-  llvm::StringMap<BufferEntry> Buffers;<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  /// Monotonically increasing index.<br class="m_-2933496869566287070gmail_msg">
-  unsigned NextIndex = 0;<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  /// Bumped to prevent "older" buffers from being removed.<br class="m_-2933496869566287070gmail_msg">
-  unsigned FirstRemovableIndex = 0;<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-public:<br class="m_-2933496869566287070gmail_msg">
-  /// Store the Buffer under the Filename.<br class="m_-2933496869566287070gmail_msg">
-  ///<br class="m_-2933496869566287070gmail_msg">
-  /// \pre There is not already buffer is not already in the cache.<br class="m_-2933496869566287070gmail_msg">
-  /// \return a reference to the buffer as a convenience.<br class="m_-2933496869566287070gmail_msg">
-  llvm::MemoryBuffer &addBuffer(llvm::StringRef Filename,<br class="m_-2933496869566287070gmail_msg">
-                                std::unique_ptr<llvm::<wbr>MemoryBuffer> Buffer);<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  /// Try to remove a buffer from the cache.<br class="m_-2933496869566287070gmail_msg">
-  ///<br class="m_-2933496869566287070gmail_msg">
-  /// \return false on success, iff \c !isBufferFinal().<br class="m_-2933496869566287070gmail_msg">
-  bool tryToRemoveBuffer(llvm::<wbr>StringRef Filename);<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  /// Get a pointer to the buffer if it exists; else nullptr.<br class="m_-2933496869566287070gmail_msg">
-  llvm::MemoryBuffer *lookupBuffer(llvm::StringRef Filename);<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  /// Check whether the buffer is final.<br class="m_-2933496869566287070gmail_msg">
-  ///<br class="m_-2933496869566287070gmail_msg">
-  /// \return true iff \a finalizeCurrentBuffers() has been called since the<br class="m_-2933496869566287070gmail_msg">
-  /// buffer was added.  This prevents buffers from being removed.<br class="m_-2933496869566287070gmail_msg">
-  bool isBufferFinal(llvm::StringRef Filename);<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  /// Finalize the current buffers in the cache.<br class="m_-2933496869566287070gmail_msg">
-  ///<br class="m_-2933496869566287070gmail_msg">
-  /// Should be called when creating a new user to ensure previous uses aren't<br class="m_-2933496869566287070gmail_msg">
-  /// invalidated.<br class="m_-2933496869566287070gmail_msg">
-  void finalizeCurrentBuffers();<br class="m_-2933496869566287070gmail_msg">
-};<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-} // end namespace clang<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-#endif // LLVM_CLANG_BASIC_<wbr>MEMORYBUFFERCACHE_H<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/include/clang/<wbr>Frontend/ASTUnit.h<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/ASTUnit.h?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/Frontend/ASTUnit.h?rev=<wbr>298185&r1=298184&r2=298185&<wbr>view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/include/clang/<wbr>Frontend/ASTUnit.h (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/include/clang/<wbr>Frontend/ASTUnit.h Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -51,7 +51,6 @@ class DiagnosticsEngine;<br class="m_-2933496869566287070gmail_msg">
 class FileEntry;<br class="m_-2933496869566287070gmail_msg">
 class FileManager;<br class="m_-2933496869566287070gmail_msg">
 class HeaderSearch;<br class="m_-2933496869566287070gmail_msg">
-class MemoryBufferCache;<br class="m_-2933496869566287070gmail_msg">
 class Preprocessor;<br class="m_-2933496869566287070gmail_msg">
 class PCHContainerOperations;<br class="m_-2933496869566287070gmail_msg">
 class PCHContainerReader;<br class="m_-2933496869566287070gmail_msg">
@@ -85,7 +84,6 @@ private:<br class="m_-2933496869566287070gmail_msg">
   IntrusiveRefCntPtr<<wbr>DiagnosticsEngine>   Diagnostics;<br class="m_-2933496869566287070gmail_msg">
   IntrusiveRefCntPtr<<wbr>FileManager>         FileMgr;<br class="m_-2933496869566287070gmail_msg">
   IntrusiveRefCntPtr<<wbr>SourceManager>       SourceMgr;<br class="m_-2933496869566287070gmail_msg">
-  IntrusiveRefCntPtr<<wbr>MemoryBufferCache>   PCMCache;<br class="m_-2933496869566287070gmail_msg">
   std::unique_ptr<HeaderSearch><wbr>           HeaderInfo;<br class="m_-2933496869566287070gmail_msg">
   IntrusiveRefCntPtr<<wbr>TargetInfo>          Target;<br class="m_-2933496869566287070gmail_msg">
   std::shared_ptr<Preprocessor><wbr>           PP;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/include/clang/<wbr>Frontend/CompilerInstance.h<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CompilerInstance.h?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/Frontend/<wbr>CompilerInstance.h?rev=298185&<wbr>r1=298184&r2=298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/include/clang/<wbr>Frontend/CompilerInstance.h (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/include/clang/<wbr>Frontend/CompilerInstance.h Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -44,7 +44,6 @@ class ExternalASTSource;<br class="m_-2933496869566287070gmail_msg">
 class FileEntry;<br class="m_-2933496869566287070gmail_msg">
 class FileManager;<br class="m_-2933496869566287070gmail_msg">
 class FrontendAction;<br class="m_-2933496869566287070gmail_msg">
-class MemoryBufferCache;<br class="m_-2933496869566287070gmail_msg">
 class Module;<br class="m_-2933496869566287070gmail_msg">
 class Preprocessor;<br class="m_-2933496869566287070gmail_msg">
 class Sema;<br class="m_-2933496869566287070gmail_msg">
@@ -91,9 +90,6 @@ class CompilerInstance : public ModuleLo<br class="m_-2933496869566287070gmail_msg">
   /// The source manager.<br class="m_-2933496869566287070gmail_msg">
   IntrusiveRefCntPtr<<wbr>SourceManager> SourceMgr;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
-  /// The cache of PCM files.<br class="m_-2933496869566287070gmail_msg">
-  IntrusiveRefCntPtr<<wbr>MemoryBufferCache> PCMCache;<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
   /// The preprocessor.<br class="m_-2933496869566287070gmail_msg">
   std::shared_ptr<Preprocessor> PP;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
@@ -182,7 +178,7 @@ public:<br class="m_-2933496869566287070gmail_msg">
   explicit CompilerInstance(<br class="m_-2933496869566287070gmail_msg">
       std::shared_ptr<<wbr>PCHContainerOperations> PCHContainerOps =<br class="m_-2933496869566287070gmail_msg">
           std::make_shared<<wbr>PCHContainerOperations>(),<br class="m_-2933496869566287070gmail_msg">
-      MemoryBufferCache *SharedPCMCache = nullptr);<br class="m_-2933496869566287070gmail_msg">
+      bool BuildingModule = false);<br class="m_-2933496869566287070gmail_msg">
   ~CompilerInstance() override;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   /// @name High-Level Operations<br class="m_-2933496869566287070gmail_msg">
@@ -787,8 +783,6 @@ public:<br class="m_-2933496869566287070gmail_msg">
   }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   void setExternalSemaSource(<wbr>IntrusiveRefCntPtr<<wbr>ExternalSemaSource> ESS);<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache &getPCMCache() const { return *PCMCache; }<br class="m_-2933496869566287070gmail_msg">
 };<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
 } // end namespace clang<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/include/clang/Lex/<wbr>Preprocessor.h<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/Preprocessor.h?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/Lex/Preprocessor.h?rev=<wbr>298185&r1=298184&r2=298185&<wbr>view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/include/clang/Lex/<wbr>Preprocessor.h (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/include/clang/Lex/<wbr>Preprocessor.h Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -47,7 +47,6 @@ class ExternalPreprocessorSource;<br class="m_-2933496869566287070gmail_msg">
 class FileManager;<br class="m_-2933496869566287070gmail_msg">
 class FileEntry;<br class="m_-2933496869566287070gmail_msg">
 class HeaderSearch;<br class="m_-2933496869566287070gmail_msg">
-class MemoryBufferCache;<br class="m_-2933496869566287070gmail_msg">
 class PragmaNamespace;<br class="m_-2933496869566287070gmail_msg">
 class PragmaHandler;<br class="m_-2933496869566287070gmail_msg">
 class CommentHandler;<br class="m_-2933496869566287070gmail_msg">
@@ -103,7 +102,6 @@ class Preprocessor {<br class="m_-2933496869566287070gmail_msg">
   const TargetInfo  *AuxTarget;<br class="m_-2933496869566287070gmail_msg">
   FileManager       &FileMgr;<br class="m_-2933496869566287070gmail_msg">
   SourceManager     &SourceMgr;<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache &PCMCache;<br class="m_-2933496869566287070gmail_msg">
   std::unique_ptr<<wbr>ScratchBuffer> ScratchBuf;<br class="m_-2933496869566287070gmail_msg">
   HeaderSearch      &HeaderInfo;<br class="m_-2933496869566287070gmail_msg">
   ModuleLoader      &TheModuleLoader;<br class="m_-2933496869566287070gmail_msg">
@@ -654,7 +652,6 @@ class Preprocessor {<br class="m_-2933496869566287070gmail_msg">
 public:<br class="m_-2933496869566287070gmail_msg">
   Preprocessor(std::shared_ptr<<wbr>PreprocessorOptions> PPOpts,<br class="m_-2933496869566287070gmail_msg">
                DiagnosticsEngine &diags, LangOptions &opts, SourceManager &SM,<br class="m_-2933496869566287070gmail_msg">
-               MemoryBufferCache &PCMCache,<br class="m_-2933496869566287070gmail_msg">
                HeaderSearch &Headers, ModuleLoader &TheModuleLoader,<br class="m_-2933496869566287070gmail_msg">
                IdentifierInfoLookup *IILookup = nullptr,<br class="m_-2933496869566287070gmail_msg">
                bool OwnsHeaderSearch = false,<br class="m_-2933496869566287070gmail_msg">
@@ -694,7 +691,6 @@ public:<br class="m_-2933496869566287070gmail_msg">
   const TargetInfo *getAuxTargetInfo() const { return AuxTarget; }<br class="m_-2933496869566287070gmail_msg">
   FileManager &getFileManager() const { return FileMgr; }<br class="m_-2933496869566287070gmail_msg">
   SourceManager &getSourceManager() const { return SourceMgr; }<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache &getPCMCache() const { return PCMCache; }<br class="m_-2933496869566287070gmail_msg">
   HeaderSearch &getHeaderSearchInfo() const { return HeaderInfo; }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   IdentifierTable &getIdentifierTable() { return Identifiers; }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/include/clang/<wbr>Serialization/ASTReader.h<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTReader.h?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/Serialization/ASTReader.<wbr>h?rev=298185&r1=298184&r2=<wbr>298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/include/clang/<wbr>Serialization/ASTReader.h (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/include/clang/<wbr>Serialization/ASTReader.h Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -408,9 +408,6 @@ private:<br class="m_-2933496869566287070gmail_msg">
   /// \brief The module manager which manages modules and their dependencies<br class="m_-2933496869566287070gmail_msg">
   ModuleManager ModuleMgr;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
-  /// The cache that manages memory buffers for PCM files.<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache &PCMCache;<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
   /// \brief A dummy identifier resolver used to merge TU-scope declarations in<br class="m_-2933496869566287070gmail_msg">
   /// C, for the cases where we don't have a Sema object to provide a real<br class="m_-2933496869566287070gmail_msg">
   /// identifier resolver.<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/include/clang/<wbr>Serialization/ASTWriter.h<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTWriter.h?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/Serialization/ASTWriter.<wbr>h?rev=298185&r1=298184&r2=<wbr>298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/include/clang/<wbr>Serialization/ASTWriter.h (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/include/clang/<wbr>Serialization/ASTWriter.h Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -54,7 +54,6 @@ class MacroInfo;<br class="m_-2933496869566287070gmail_msg">
 class OpaqueValueExpr;<br class="m_-2933496869566287070gmail_msg">
 class OpenCLOptions;<br class="m_-2933496869566287070gmail_msg">
 class ASTReader;<br class="m_-2933496869566287070gmail_msg">
-class MemoryBufferCache;<br class="m_-2933496869566287070gmail_msg">
 class Module;<br class="m_-2933496869566287070gmail_msg">
 class ModuleFileExtension;<br class="m_-2933496869566287070gmail_msg">
 class ModuleFileExtensionWriter;<br class="m_-2933496869566287070gmail_msg">
@@ -110,9 +109,6 @@ private:<br class="m_-2933496869566287070gmail_msg">
   /// The buffer associated with the bitstream.<br class="m_-2933496869566287070gmail_msg">
   const SmallVectorImpl<char> &Buffer;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
-  /// \brief The PCM manager which manages memory buffers for pcm files.<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache &PCMCache;<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
   /// \brief The ASTContext we're writing.<br class="m_-2933496869566287070gmail_msg">
   ASTContext *Context = nullptr;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
@@ -516,7 +512,6 @@ public:<br class="m_-2933496869566287070gmail_msg">
   /// \brief Create a new precompiled header writer that outputs to<br class="m_-2933496869566287070gmail_msg">
   /// the given bitstream.<br class="m_-2933496869566287070gmail_msg">
   ASTWriter(llvm::<wbr>BitstreamWriter &Stream, SmallVectorImpl<char> &Buffer,<br class="m_-2933496869566287070gmail_msg">
-            MemoryBufferCache &PCMCache,<br class="m_-2933496869566287070gmail_msg">
             ArrayRef<std::shared_ptr<<wbr>ModuleFileExtension>> Extensions,<br class="m_-2933496869566287070gmail_msg">
             bool IncludeTimestamps = true);<br class="m_-2933496869566287070gmail_msg">
   ~ASTWriter() override;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/include/clang/<wbr>Serialization/Module.h<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/Module.h?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/Serialization/Module.h?<wbr>rev=298185&r1=298184&r2=<wbr>298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/include/clang/<wbr>Serialization/Module.h (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/include/clang/<wbr>Serialization/Module.h Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -163,9 +163,9 @@ public:<br class="m_-2933496869566287070gmail_msg">
   /// \brief The generation of which this module file is a part.<br class="m_-2933496869566287070gmail_msg">
   unsigned Generation;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
-  /// The memory buffer that stores the data associated with<br class="m_-2933496869566287070gmail_msg">
-  /// this AST file, owned by the PCMCache in the ModuleManager.<br class="m_-2933496869566287070gmail_msg">
-  llvm::MemoryBuffer *Buffer;<br class="m_-2933496869566287070gmail_msg">
+  /// \brief The memory buffer that stores the data associated with<br class="m_-2933496869566287070gmail_msg">
+  /// this AST file.<br class="m_-2933496869566287070gmail_msg">
+  std::unique_ptr<llvm::<wbr>MemoryBuffer> Buffer;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   /// \brief The size of this file, in bits.<br class="m_-2933496869566287070gmail_msg">
   uint64_t SizeInBits = 0;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/include/clang/<wbr>Serialization/ModuleManager.h<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ModuleManager.h?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/Serialization/<wbr>ModuleManager.h?rev=298185&r1=<wbr>298184&r2=298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/include/clang/<wbr>Serialization/ModuleManager.h (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/include/clang/<wbr>Serialization/ModuleManager.h Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -24,7 +24,6 @@<br class="m_-2933496869566287070gmail_msg">
 namespace clang {<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
 class GlobalModuleIndex;<br class="m_-2933496869566287070gmail_msg">
-class MemoryBufferCache;<br class="m_-2933496869566287070gmail_msg">
 class ModuleMap;<br class="m_-2933496869566287070gmail_msg">
 class PCHContainerReader;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
@@ -52,9 +51,6 @@ class ModuleManager {<br class="m_-2933496869566287070gmail_msg">
   /// FileEntry *.<br class="m_-2933496869566287070gmail_msg">
   FileManager &FileMgr;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
-  /// Cache of PCM files.<br class="m_-2933496869566287070gmail_msg">
-  IntrusiveRefCntPtr<<wbr>MemoryBufferCache> PCMCache;<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
   /// \brief Knows how to unwrap module containers.<br class="m_-2933496869566287070gmail_msg">
   const PCHContainerReader &PCHContainerRdr;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
@@ -127,7 +123,7 @@ public:<br class="m_-2933496869566287070gmail_msg">
       ModuleReverseIterator;<br class="m_-2933496869566287070gmail_msg">
   typedef std::pair<uint32_t, StringRef> ModuleOffset;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
-  explicit ModuleManager(FileManager &FileMgr, MemoryBufferCache &PCMCache,<br class="m_-2933496869566287070gmail_msg">
+  explicit ModuleManager(FileManager &FileMgr,<br class="m_-2933496869566287070gmail_msg">
                          const PCHContainerReader &PCHContainerRdr);<br class="m_-2933496869566287070gmail_msg">
   ~ModuleManager();<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
@@ -294,8 +290,6 @@ public:<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   /// \brief View the graphviz representation of the module graph.<br class="m_-2933496869566287070gmail_msg">
   void viewGraph();<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache &getPCMCache() const { return *PCMCache; }<br class="m_-2933496869566287070gmail_msg">
 };<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
 } } // end namespace clang::serialization<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/lib/Basic/<wbr>CMakeLists.txt<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/CMakeLists.txt?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/Basic/<wbr>CMakeLists.txt?rev=298185&r1=<wbr>298184&r2=298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/lib/Basic/<wbr>CMakeLists.txt (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/lib/Basic/<wbr>CMakeLists.txt Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -74,7 +74,6 @@ add_clang_library(clangBasic<br class="m_-2933496869566287070gmail_msg">
   FileSystemStatCache.cpp<br class="m_-2933496869566287070gmail_msg">
   IdentifierTable.cpp<br class="m_-2933496869566287070gmail_msg">
   LangOptions.cpp<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache.cpp<br class="m_-2933496869566287070gmail_msg">
   Module.cpp<br class="m_-2933496869566287070gmail_msg">
   ObjCRuntime.cpp<br class="m_-2933496869566287070gmail_msg">
   OpenMPKinds.cpp<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed: cfe/trunk/lib/Basic/<wbr>MemoryBufferCache.cpp<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/MemoryBufferCache.cpp?rev=298184&view=auto" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/Basic/<wbr>MemoryBufferCache.cpp?rev=<wbr>298184&view=auto</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/lib/Basic/<wbr>MemoryBufferCache.cpp (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/lib/Basic/<wbr>MemoryBufferCache.cpp (removed)<br class="m_-2933496869566287070gmail_msg">
@@ -1,48 +0,0 @@<br class="m_-2933496869566287070gmail_msg">
-//===- MemoryBufferCache.cpp - Cache for loaded memory buffers ------------===//<br class="m_-2933496869566287070gmail_msg">
-//<br class="m_-2933496869566287070gmail_msg">
-//                     The LLVM Compiler Infrastructure<br class="m_-2933496869566287070gmail_msg">
-//<br class="m_-2933496869566287070gmail_msg">
-// This file is distributed under the University of Illinois Open Source<br class="m_-2933496869566287070gmail_msg">
-// License. See LICENSE.TXT for details.<br class="m_-2933496869566287070gmail_msg">
-//<br class="m_-2933496869566287070gmail_msg">
-//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-#include "clang/Basic/<wbr>MemoryBufferCache.h"<br class="m_-2933496869566287070gmail_msg">
-#include "llvm/Support/MemoryBuffer.h"<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-using namespace clang;<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-llvm::MemoryBuffer &<br class="m_-2933496869566287070gmail_msg">
-MemoryBufferCache::addBuffer(<wbr>llvm::StringRef Filename,<br class="m_-2933496869566287070gmail_msg">
-                             std::unique_ptr<llvm::<wbr>MemoryBuffer> Buffer) {<br class="m_-2933496869566287070gmail_msg">
-  auto Insertion =<br class="m_-2933496869566287070gmail_msg">
-      Buffers.insert({Filename, BufferEntry{std::move(Buffer), NextIndex++}});<br class="m_-2933496869566287070gmail_msg">
-  assert(Insertion.second && "Already has a buffer");<br class="m_-2933496869566287070gmail_msg">
-  return *Insertion.first->second.<wbr>Buffer;<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-llvm::MemoryBuffer *MemoryBufferCache::<wbr>lookupBuffer(llvm::StringRef Filename) {<br class="m_-2933496869566287070gmail_msg">
-  auto I = Buffers.find(Filename);<br class="m_-2933496869566287070gmail_msg">
-  if (I == Buffers.end())<br class="m_-2933496869566287070gmail_msg">
-    return nullptr;<br class="m_-2933496869566287070gmail_msg">
-  return I->second.Buffer.get();<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-bool MemoryBufferCache::<wbr>isBufferFinal(llvm::StringRef Filename) {<br class="m_-2933496869566287070gmail_msg">
-  auto I = Buffers.find(Filename);<br class="m_-2933496869566287070gmail_msg">
-  if (I == Buffers.end())<br class="m_-2933496869566287070gmail_msg">
-    return false;<br class="m_-2933496869566287070gmail_msg">
-  return I->second.Index < FirstRemovableIndex;<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-bool MemoryBufferCache::<wbr>tryToRemoveBuffer(llvm::<wbr>StringRef Filename) {<br class="m_-2933496869566287070gmail_msg">
-  auto I = Buffers.find(Filename);<br class="m_-2933496869566287070gmail_msg">
-  assert(I != Buffers.end() && "No buffer to remove...");<br class="m_-2933496869566287070gmail_msg">
-  if (I->second.Index < FirstRemovableIndex)<br class="m_-2933496869566287070gmail_msg">
-    return true;<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  Buffers.erase(I);<br class="m_-2933496869566287070gmail_msg">
-  return false;<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-void MemoryBufferCache::<wbr>finalizeCurrentBuffers() { FirstRemovableIndex = NextIndex; }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/lib/Frontend/<wbr>ASTUnit.cpp<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/<wbr>Frontend/ASTUnit.cpp?rev=<wbr>298185&r1=298184&r2=298185&<wbr>view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/lib/Frontend/<wbr>ASTUnit.cpp (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/lib/Frontend/<wbr>ASTUnit.cpp Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -18,7 +18,6 @@<br class="m_-2933496869566287070gmail_msg">
 #include "clang/AST/StmtVisitor.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/AST/TypeOrdering.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/Diagnostic.h"<br class="m_-2933496869566287070gmail_msg">
-#include "clang/Basic/<wbr>MemoryBufferCache.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/TargetInfo.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/TargetOptions.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/<wbr>VirtualFileSystem.h"<br class="m_-2933496869566287070gmail_msg">
@@ -186,8 +185,7 @@ struct ASTUnit::ASTWriterData {<br class="m_-2933496869566287070gmail_msg">
   llvm::BitstreamWriter Stream;<br class="m_-2933496869566287070gmail_msg">
   ASTWriter Writer;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
-  ASTWriterData(<wbr>MemoryBufferCache &PCMCache)<br class="m_-2933496869566287070gmail_msg">
-      : Stream(Buffer), Writer(Stream, Buffer, PCMCache, {}) {}<br class="m_-2933496869566287070gmail_msg">
+  ASTWriterData() : Stream(Buffer), Writer(Stream, Buffer, {}) {}<br class="m_-2933496869566287070gmail_msg">
 };<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
 void ASTUnit::clearFileLevelDecls() {<br class="m_-2933496869566287070gmail_msg">
@@ -683,7 +681,6 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFr<br class="m_-2933496869566287070gmail_msg">
   AST->SourceMgr = new SourceManager(AST-><wbr>getDiagnostics(),<br class="m_-2933496869566287070gmail_msg">
                                      AST->getFileManager(),<br class="m_-2933496869566287070gmail_msg">
                                      UserFilesAreVolatile);<br class="m_-2933496869566287070gmail_msg">
-  AST->PCMCache = new MemoryBufferCache;<br class="m_-2933496869566287070gmail_msg">
   AST->HSOpts = std::make_shared<<wbr>HeaderSearchOptions>();<br class="m_-2933496869566287070gmail_msg">
   AST->HSOpts->ModuleFormat = PCHContainerRdr.getFormat();<br class="m_-2933496869566287070gmail_msg">
   AST->HeaderInfo.reset(new HeaderSearch(AST->HSOpts,<br class="m_-2933496869566287070gmail_msg">
@@ -704,7 +701,7 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFr<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   AST->PP = std::make_shared<Preprocessor><wbr>(<br class="m_-2933496869566287070gmail_msg">
       std::move(PPOpts), AST->getDiagnostics(), AST->ASTFileLangOpts,<br class="m_-2933496869566287070gmail_msg">
-      AST->getSourceManager(), *AST->PCMCache, HeaderInfo, *AST,<br class="m_-2933496869566287070gmail_msg">
+      AST->getSourceManager(), HeaderInfo, *AST,<br class="m_-2933496869566287070gmail_msg">
       /*IILookup=*/nullptr,<br class="m_-2933496869566287070gmail_msg">
       /*OwnsHeaderSearch=*/false);<br class="m_-2933496869566287070gmail_msg">
   Preprocessor &PP = *AST->PP;<br class="m_-2933496869566287070gmail_msg">
@@ -1730,7 +1727,6 @@ ASTUnit::create(std::shared_<wbr>ptr<Compiler<br class="m_-2933496869566287070gmail_msg">
   AST->UserFilesAreVolatile = UserFilesAreVolatile;<br class="m_-2933496869566287070gmail_msg">
   AST->SourceMgr = new SourceManager(AST-><wbr>getDiagnostics(), *AST->FileMgr,<br class="m_-2933496869566287070gmail_msg">
                                      UserFilesAreVolatile);<br class="m_-2933496869566287070gmail_msg">
-  AST->PCMCache = new MemoryBufferCache;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   return AST;<br class="m_-2933496869566287070gmail_msg">
 }<br class="m_-2933496869566287070gmail_msg">
@@ -2001,7 +1997,6 @@ ASTUnit *ASTUnit::LoadFromCommandLine(<br class="m_-2933496869566287070gmail_msg">
   if (!VFS)<br class="m_-2933496869566287070gmail_msg">
     return nullptr;<br class="m_-2933496869566287070gmail_msg">
   AST->FileMgr = new FileManager(AST-><wbr>FileSystemOpts, VFS);<br class="m_-2933496869566287070gmail_msg">
-  AST->PCMCache = new MemoryBufferCache;<br class="m_-2933496869566287070gmail_msg">
   AST->OnlyLocalDecls = OnlyLocalDecls;<br class="m_-2933496869566287070gmail_msg">
   AST->CaptureDiagnostics = CaptureDiagnostics;<br class="m_-2933496869566287070gmail_msg">
   AST->TUKind = TUKind;<br class="m_-2933496869566287070gmail_msg">
@@ -2013,7 +2008,7 @@ ASTUnit *ASTUnit::LoadFromCommandLine(<br class="m_-2933496869566287070gmail_msg">
   AST->StoredDiagnostics.swap(<wbr>StoredDiagnostics);<br class="m_-2933496869566287070gmail_msg">
   AST->Invocation = CI;<br class="m_-2933496869566287070gmail_msg">
   if (ForSerialization)<br class="m_-2933496869566287070gmail_msg">
-    AST->WriterData.reset(new ASTWriterData(*AST->PCMCache))<wbr>;<br class="m_-2933496869566287070gmail_msg">
+    AST->WriterData.reset(new ASTWriterData());<br class="m_-2933496869566287070gmail_msg">
   // Zero out now to ease cleanup during crash recovery.<br class="m_-2933496869566287070gmail_msg">
   CI = nullptr;<br class="m_-2933496869566287070gmail_msg">
   Diags = nullptr;<br class="m_-2933496869566287070gmail_msg">
@@ -2528,8 +2523,7 @@ bool ASTUnit::serialize(raw_ostream &OS)<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   SmallString<128> Buffer;<br class="m_-2933496869566287070gmail_msg">
   llvm::BitstreamWriter Stream(Buffer);<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache PCMCache;<br class="m_-2933496869566287070gmail_msg">
-  ASTWriter Writer(Stream, Buffer, PCMCache, {});<br class="m_-2933496869566287070gmail_msg">
+  ASTWriter Writer(Stream, Buffer, {});<br class="m_-2933496869566287070gmail_msg">
   return serializeUnit(Writer, Buffer, getSema(), hasErrors, OS);<br class="m_-2933496869566287070gmail_msg">
 }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/lib/Frontend/<wbr>CompilerInstance.cpp<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/<wbr>Frontend/CompilerInstance.cpp?<wbr>rev=298185&r1=298184&r2=<wbr>298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/lib/Frontend/<wbr>CompilerInstance.cpp (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/lib/Frontend/<wbr>CompilerInstance.cpp Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -13,7 +13,6 @@<br class="m_-2933496869566287070gmail_msg">
 #include "clang/AST/Decl.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/Diagnostic.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/FileManager.h"<br class="m_-2933496869566287070gmail_msg">
-#include "clang/Basic/<wbr>MemoryBufferCache.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/SourceManager.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/TargetInfo.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/Version.h"<br class="m_-2933496869566287070gmail_msg">
@@ -56,15 +55,9 @@ using namespace clang;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
 CompilerInstance::<wbr>CompilerInstance(<br class="m_-2933496869566287070gmail_msg">
     std::shared_ptr<<wbr>PCHContainerOperations> PCHContainerOps,<br class="m_-2933496869566287070gmail_msg">
-    MemoryBufferCache *SharedPCMCache)<br class="m_-2933496869566287070gmail_msg">
-    : ModuleLoader(/* BuildingModule = */ SharedPCMCache),<br class="m_-2933496869566287070gmail_msg">
-      Invocation(new CompilerInvocation()),<br class="m_-2933496869566287070gmail_msg">
-      PCMCache(SharedPCMCache ? SharedPCMCache : new MemoryBufferCache),<br class="m_-2933496869566287070gmail_msg">
-      ThePCHContainerOperations(std:<wbr>:move(PCHContainerOps)) {<br class="m_-2933496869566287070gmail_msg">
-  // Don't allow this to invalidate buffers in use by others.<br class="m_-2933496869566287070gmail_msg">
-  if (SharedPCMCache)<br class="m_-2933496869566287070gmail_msg">
-    getPCMCache().<wbr>finalizeCurrentBuffers();<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
+    bool BuildingModule)<br class="m_-2933496869566287070gmail_msg">
+    : ModuleLoader(BuildingModule), Invocation(new CompilerInvocation()),<br class="m_-2933496869566287070gmail_msg">
+      ThePCHContainerOperations(std:<wbr>:move(PCHContainerOps)) {}<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
 CompilerInstance::~<wbr>CompilerInstance() {<br class="m_-2933496869566287070gmail_msg">
   assert(OutputFiles.empty() && "Still output files in flight?");<br class="m_-2933496869566287070gmail_msg">
@@ -135,8 +128,6 @@ IntrusiveRefCntPtr<ASTReader> CompilerIn<br class="m_-2933496869566287070gmail_msg">
   return ModuleManager;<br class="m_-2933496869566287070gmail_msg">
 }<br class="m_-2933496869566287070gmail_msg">
 void CompilerInstance::<wbr>setModuleManager(<wbr>IntrusiveRefCntPtr<ASTReader> Reader) {<br class="m_-2933496869566287070gmail_msg">
-  assert(PCMCache.get() == &Reader->getModuleManager().<wbr>getPCMCache() &&<br class="m_-2933496869566287070gmail_msg">
-         "Expected ASTReader to use the same PCM cache");<br class="m_-2933496869566287070gmail_msg">
   ModuleManager = std::move(Reader);<br class="m_-2933496869566287070gmail_msg">
 }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
@@ -379,7 +370,7 @@ void CompilerInstance::<wbr>createPreprocesso<br class="m_-2933496869566287070gmail_msg">
                        getDiagnostics(), getLangOpts(), &getTarget());<br class="m_-2933496869566287070gmail_msg">
   PP = std::make_shared<Preprocessor><wbr>(<br class="m_-2933496869566287070gmail_msg">
       Invocation-><wbr>getPreprocessorOptsPtr(), getDiagnostics(), getLangOpts(),<br class="m_-2933496869566287070gmail_msg">
-      getSourceManager(), getPCMCache(), *HeaderInfo, *this, PTHMgr,<br class="m_-2933496869566287070gmail_msg">
+      getSourceManager(), *HeaderInfo, *this, PTHMgr,<br class="m_-2933496869566287070gmail_msg">
       /*OwnsHeaderSearch=*/true, TUKind);<br class="m_-2933496869566287070gmail_msg">
   PP->Initialize(getTarget(), getAuxTarget());<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
@@ -1082,11 +1073,9 @@ static bool compileModuleImpl(CompilerIn<br class="m_-2933496869566287070gmail_msg">
          Invocation->getModuleHash() && "Module hash mismatch!");<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   // Construct a compiler instance that will be used to actually create the<br class="m_-2933496869566287070gmail_msg">
-  // module.  Since we're sharing a PCMCache,<br class="m_-2933496869566287070gmail_msg">
-  // CompilerInstance::<wbr>CompilerInstance is responsible for finalizing the<br class="m_-2933496869566287070gmail_msg">
-  // buffers to prevent use-after-frees.<br class="m_-2933496869566287070gmail_msg">
+  // module.<br class="m_-2933496869566287070gmail_msg">
   CompilerInstance Instance(ImportingInstance.<wbr>getPCHContainerOperations(),<br class="m_-2933496869566287070gmail_msg">
-                            &ImportingInstance.<wbr>getPreprocessor().getPCMCache(<wbr>));<br class="m_-2933496869566287070gmail_msg">
+                            /*BuildingModule=*/true);<br class="m_-2933496869566287070gmail_msg">
   auto &Inv = *Invocation;<br class="m_-2933496869566287070gmail_msg">
   Instance.setInvocation(std::<wbr>move(Invocation));<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/lib/Lex/<wbr>Preprocessor.cpp<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/Lex/<wbr>Preprocessor.cpp?rev=298185&<wbr>r1=298184&r2=298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/lib/Lex/<wbr>Preprocessor.cpp (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/lib/Lex/<wbr>Preprocessor.cpp Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -70,15 +70,15 @@ ExternalPreprocessorSource::~<wbr>ExternalPre<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
 Preprocessor::Preprocessor(<wbr>std::shared_ptr<<wbr>PreprocessorOptions> PPOpts,<br class="m_-2933496869566287070gmail_msg">
                            DiagnosticsEngine &diags, LangOptions &opts,<br class="m_-2933496869566287070gmail_msg">
-                           SourceManager &SM, MemoryBufferCache &PCMCache,<br class="m_-2933496869566287070gmail_msg">
-                           HeaderSearch &Headers, ModuleLoader &TheModuleLoader,<br class="m_-2933496869566287070gmail_msg">
+                           SourceManager &SM, HeaderSearch &Headers,<br class="m_-2933496869566287070gmail_msg">
+                           ModuleLoader &TheModuleLoader,<br class="m_-2933496869566287070gmail_msg">
                            IdentifierInfoLookup *IILookup, bool OwnsHeaders,<br class="m_-2933496869566287070gmail_msg">
                            TranslationUnitKind TUKind)<br class="m_-2933496869566287070gmail_msg">
     : PPOpts(std::move(PPOpts)), Diags(&diags), LangOpts(opts), Target(nullptr),<br class="m_-2933496869566287070gmail_msg">
       AuxTarget(nullptr), FileMgr(Headers.getFileMgr()), SourceMgr(SM),<br class="m_-2933496869566287070gmail_msg">
-      PCMCache(PCMCache), ScratchBuf(new ScratchBuffer(SourceMgr)),<br class="m_-2933496869566287070gmail_msg">
-      HeaderInfo(Headers), TheModuleLoader(<wbr>TheModuleLoader),<br class="m_-2933496869566287070gmail_msg">
-      ExternalSource(nullptr), Identifiers(opts, IILookup),<br class="m_-2933496869566287070gmail_msg">
+      ScratchBuf(new ScratchBuffer(SourceMgr)), HeaderInfo(Headers),<br class="m_-2933496869566287070gmail_msg">
+      TheModuleLoader(<wbr>TheModuleLoader), ExternalSource(nullptr),<br class="m_-2933496869566287070gmail_msg">
+      Identifiers(opts, IILookup),<br class="m_-2933496869566287070gmail_msg">
       PragmaHandlers(new PragmaNamespace(StringRef())),<br class="m_-2933496869566287070gmail_msg">
       IncrementalProcessing(false), TUKind(TUKind), CodeComplete(nullptr),<br class="m_-2933496869566287070gmail_msg">
       CodeCompletionFile(nullptr), CodeCompletionOffset(0),<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/lib/Serialization/<wbr>ASTReader.cpp<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/<wbr>Serialization/ASTReader.cpp?<wbr>rev=298185&r1=298184&r2=<wbr>298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/lib/Serialization/<wbr>ASTReader.cpp (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/lib/Serialization/<wbr>ASTReader.cpp Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -37,7 +37,6 @@<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/FileManager.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/<wbr>FileSystemOptions.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/LangOptions.h"<br class="m_-2933496869566287070gmail_msg">
-#include "clang/Basic/<wbr>MemoryBufferCache.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/ObjCRuntime.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/OperatorKinds.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/Sanitizers.h"<br class="m_-2933496869566287070gmail_msg">
@@ -464,9 +463,19 @@ static bool checkDiagnosticMappings(Diag<br class="m_-2933496869566287070gmail_msg">
   return checkDiagnosticGroupMappings(<wbr>StoredDiags, Diags, Complain);<br class="m_-2933496869566287070gmail_msg">
 }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
-/// Return the top import module if it is implicit, nullptr otherwise.<br class="m_-2933496869566287070gmail_msg">
-static Module *getTopImportImplicitModule(<wbr>ModuleManager &ModuleMgr,<br class="m_-2933496869566287070gmail_msg">
-                                          Preprocessor &PP) {<br class="m_-2933496869566287070gmail_msg">
+bool PCHValidator::<wbr>ReadDiagnosticOptions(<br class="m_-2933496869566287070gmail_msg">
+    IntrusiveRefCntPtr<<wbr>DiagnosticOptions> DiagOpts, bool Complain) {<br class="m_-2933496869566287070gmail_msg">
+  DiagnosticsEngine &ExistingDiags = PP.getDiagnostics();<br class="m_-2933496869566287070gmail_msg">
+  IntrusiveRefCntPtr<<wbr>DiagnosticIDs> DiagIDs(ExistingDiags.<wbr>getDiagnosticIDs());<br class="m_-2933496869566287070gmail_msg">
+  IntrusiveRefCntPtr<<wbr>DiagnosticsEngine> Diags(<br class="m_-2933496869566287070gmail_msg">
+      new DiagnosticsEngine(DiagIDs, DiagOpts.get()));<br class="m_-2933496869566287070gmail_msg">
+  // This should never fail, because we would have processed these options<br class="m_-2933496869566287070gmail_msg">
+  // before writing them to an ASTFile.<br class="m_-2933496869566287070gmail_msg">
+  ProcessWarningOptions(*Diags, *DiagOpts, /*Report*/false);<br class="m_-2933496869566287070gmail_msg">
+<br class="m_-2933496869566287070gmail_msg">
+  ModuleManager &ModuleMgr = Reader.getModuleManager();<br class="m_-2933496869566287070gmail_msg">
+  assert(ModuleMgr.size() >= 1 && "what ASTFile is this then");<br class="m_-2933496869566287070gmail_msg">
+<br class="m_-2933496869566287070gmail_msg">
   // If the original import came from a file explicitly generated by the user,<br class="m_-2933496869566287070gmail_msg">
   // don't check the diagnostic mappings.<br class="m_-2933496869566287070gmail_msg">
   // FIXME: currently this is approximated by checking whether this is not a<br class="m_-2933496869566287070gmail_msg">
@@ -478,37 +487,17 @@ static Module *getTopImportImplicitModul<br class="m_-2933496869566287070gmail_msg">
   while (!TopImport->ImportedBy.empty(<wbr>))<br class="m_-2933496869566287070gmail_msg">
     TopImport = TopImport->ImportedBy[0];<br class="m_-2933496869566287070gmail_msg">
   if (TopImport->Kind != MK_ImplicitModule)<br class="m_-2933496869566287070gmail_msg">
-    return nullptr;<br class="m_-2933496869566287070gmail_msg">
+    return false;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   StringRef ModuleName = TopImport->ModuleName;<br class="m_-2933496869566287070gmail_msg">
   assert(!ModuleName.empty() && "diagnostic options read before module name");<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   Module *M = PP.getHeaderSearchInfo().<wbr>lookupModule(ModuleName);<br class="m_-2933496869566287070gmail_msg">
   assert(M && "missing module");<br class="m_-2933496869566287070gmail_msg">
-  return M;<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-bool PCHValidator::<wbr>ReadDiagnosticOptions(<br class="m_-2933496869566287070gmail_msg">
-    IntrusiveRefCntPtr<<wbr>DiagnosticOptions> DiagOpts, bool Complain) {<br class="m_-2933496869566287070gmail_msg">
-  DiagnosticsEngine &ExistingDiags = PP.getDiagnostics();<br class="m_-2933496869566287070gmail_msg">
-  IntrusiveRefCntPtr<<wbr>DiagnosticIDs> DiagIDs(ExistingDiags.<wbr>getDiagnosticIDs());<br class="m_-2933496869566287070gmail_msg">
-  IntrusiveRefCntPtr<<wbr>DiagnosticsEngine> Diags(<br class="m_-2933496869566287070gmail_msg">
-      new DiagnosticsEngine(DiagIDs, DiagOpts.get()));<br class="m_-2933496869566287070gmail_msg">
-  // This should never fail, because we would have processed these options<br class="m_-2933496869566287070gmail_msg">
-  // before writing them to an ASTFile.<br class="m_-2933496869566287070gmail_msg">
-  ProcessWarningOptions(*Diags, *DiagOpts, /*Report*/false);<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  ModuleManager &ModuleMgr = Reader.getModuleManager();<br class="m_-2933496869566287070gmail_msg">
-  assert(ModuleMgr.size() >= 1 && "what ASTFile is this then");<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  Module *TopM = getTopImportImplicitModule(<wbr>ModuleMgr, PP);<br class="m_-2933496869566287070gmail_msg">
-  if (!TopM)<br class="m_-2933496869566287070gmail_msg">
-    return false;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   // FIXME: if the diagnostics are incompatible, save a DiagnosticOptions that<br class="m_-2933496869566287070gmail_msg">
   // contains the union of their flags.<br class="m_-2933496869566287070gmail_msg">
-  return checkDiagnosticMappings(*<wbr>Diags, ExistingDiags, TopM->IsSystem,<br class="m_-2933496869566287070gmail_msg">
-                                 Complain);<br class="m_-2933496869566287070gmail_msg">
+  return checkDiagnosticMappings(*<wbr>Diags, ExistingDiags, M->IsSystem, Complain);<br class="m_-2933496869566287070gmail_msg">
 }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
 /// \brief Collect the macro definitions provided by the given preprocessor<br class="m_-2933496869566287070gmail_msg">
@@ -4075,41 +4064,12 @@ ASTReader::<wbr>readUnhashedControlBlock(Modu<br class="m_-2933496869566287070gmail_msg">
       Listener.get(),<br class="m_-2933496869566287070gmail_msg">
       WasImportedBy ? false : HSOpts.<wbr>ModulesValidateDiagnosticOptio<wbr>ns);<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
-  // If F was directly imported by another module, it's implicitly validated by<br class="m_-2933496869566287070gmail_msg">
-  // the importing module.<br class="m_-2933496869566287070gmail_msg">
   if (DisableValidation || WasImportedBy ||<br class="m_-2933496869566287070gmail_msg">
       (AllowConfigurationMismatch && Result == ConfigurationMismatch))<br class="m_-2933496869566287070gmail_msg">
     return Success;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
-  if (Result == Failure) {<br class="m_-2933496869566287070gmail_msg">
+  if (Result == Failure)<br class="m_-2933496869566287070gmail_msg">
     Error("malformed block record in AST file");<br class="m_-2933496869566287070gmail_msg">
-    return Failure;<br class="m_-2933496869566287070gmail_msg">
-  }<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  if (Result == OutOfDate && F.Kind == MK_ImplicitModule) {<br class="m_-2933496869566287070gmail_msg">
-    // If this module has already been finalized in the PCMCache, we're stuck<br class="m_-2933496869566287070gmail_msg">
-    // with it; we can only load a single version of each module.<br class="m_-2933496869566287070gmail_msg">
-    //<br class="m_-2933496869566287070gmail_msg">
-    // This can happen when a module is imported in two contexts: in one, as a<br class="m_-2933496869566287070gmail_msg">
-    // user module; in another, as a system module (due to an import from<br class="m_-2933496869566287070gmail_msg">
-    // another module marked with the [system] flag).  It usually indicates a<br class="m_-2933496869566287070gmail_msg">
-    // bug in the module map: this module should also be marked with [system].<br class="m_-2933496869566287070gmail_msg">
-    //<br class="m_-2933496869566287070gmail_msg">
-    // If -Wno-system-headers (the default), and the first import is as a<br class="m_-2933496869566287070gmail_msg">
-    // system module, then validation will fail during the as-user import,<br class="m_-2933496869566287070gmail_msg">
-    // since -Werror flags won't have been validated.  However, it's reasonable<br class="m_-2933496869566287070gmail_msg">
-    // to treat this consistently as a system module.<br class="m_-2933496869566287070gmail_msg">
-    //<br class="m_-2933496869566287070gmail_msg">
-    // If -Wsystem-headers, the PCM on disk was built with<br class="m_-2933496869566287070gmail_msg">
-    // -Wno-system-headers, and the first import is as a user module, then<br class="m_-2933496869566287070gmail_msg">
-    // validation will fail during the as-system import since the PCM on disk<br class="m_-2933496869566287070gmail_msg">
-    // doesn't guarantee that -Werror was respected.  However, the -Werror<br class="m_-2933496869566287070gmail_msg">
-    // flags were checked during the initial as-user import.<br class="m_-2933496869566287070gmail_msg">
-    if (PCMCache.isBufferFinal(F.<wbr>FileName)) {<br class="m_-2933496869566287070gmail_msg">
-      Diag(diag::warn_module_system_<wbr>bit_conflict) << F.FileName;<br class="m_-2933496869566287070gmail_msg">
-      return Success;<br class="m_-2933496869566287070gmail_msg">
-    }<br class="m_-2933496869566287070gmail_msg">
-  }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   return Result;<br class="m_-2933496869566287070gmail_msg">
 }<br class="m_-2933496869566287070gmail_msg">
@@ -4162,7 +4122,7 @@ ASTReader::ASTReadResult ASTReader::read<br class="m_-2933496869566287070gmail_msg">
       if (Listener && ValidateDiagnosticOptions &&<br class="m_-2933496869566287070gmail_msg">
           !<wbr>AllowCompatibleConfigurationMi<wbr>smatch &&<br class="m_-2933496869566287070gmail_msg">
           ParseDiagnosticOptions(<wbr>Record, Complain, *Listener))<br class="m_-2933496869566287070gmail_msg">
-        Result = OutOfDate; // Don't return early.  Read the signature.<br class="m_-2933496869566287070gmail_msg">
+        return OutOfDate;<br class="m_-2933496869566287070gmail_msg">
       break;<br class="m_-2933496869566287070gmail_msg">
     }<br class="m_-2933496869566287070gmail_msg">
     case DIAG_PRAGMA_MAPPINGS:<br class="m_-2933496869566287070gmail_msg">
@@ -7341,7 +7301,7 @@ LLVM_DUMP_METHOD void ASTReader::dump()<br class="m_-2933496869566287070gmail_msg">
 /// by heap-backed versus mmap'ed memory.<br class="m_-2933496869566287070gmail_msg">
 void ASTReader::<wbr>getMemoryBufferSizes(<wbr>MemoryBufferSizes &sizes) const {<br class="m_-2933496869566287070gmail_msg">
   for (ModuleFile &I : ModuleMgr) {<br class="m_-2933496869566287070gmail_msg">
-    if (llvm::MemoryBuffer *buf = I.Buffer) {<br class="m_-2933496869566287070gmail_msg">
+    if (llvm::MemoryBuffer *buf = I.Buffer.get()) {<br class="m_-2933496869566287070gmail_msg">
       size_t bytes = buf->getBufferSize();<br class="m_-2933496869566287070gmail_msg">
       switch (buf->getBufferKind()) {<br class="m_-2933496869566287070gmail_msg">
         case llvm::MemoryBuffer::<wbr>MemoryBuffer_Malloc:<br class="m_-2933496869566287070gmail_msg">
@@ -9668,10 +9628,8 @@ ASTReader::ASTReader(<wbr>Preprocessor &PP, A<br class="m_-2933496869566287070gmail_msg">
                    : cast<ASTReaderListener>(new PCHValidator(PP, *this))),<br class="m_-2933496869566287070gmail_msg">
       SourceMgr(PP.<wbr>getSourceManager()), FileMgr(PP.getFileManager()),<br class="m_-2933496869566287070gmail_msg">
       PCHContainerRdr(<wbr>PCHContainerRdr), Diags(PP.getDiagnostics()), PP(PP),<br class="m_-2933496869566287070gmail_msg">
-      Context(Context),<br class="m_-2933496869566287070gmail_msg">
-      ModuleMgr(PP.getFileManager(), PP.getPCMCache(), PCHContainerRdr),<br class="m_-2933496869566287070gmail_msg">
-      PCMCache(PP.getPCMCache()), DummyIdResolver(PP),<br class="m_-2933496869566287070gmail_msg">
-      ReadTimer(std::move(ReadTimer)<wbr>), isysroot(isysroot),<br class="m_-2933496869566287070gmail_msg">
+      Context(Context), ModuleMgr(PP.getFileManager(), PCHContainerRdr),<br class="m_-2933496869566287070gmail_msg">
+      DummyIdResolver(PP), ReadTimer(std::move(ReadTimer)<wbr>), isysroot(isysroot),<br class="m_-2933496869566287070gmail_msg">
       DisableValidation(<wbr>DisableValidation),<br class="m_-2933496869566287070gmail_msg">
       AllowASTWithCompilerErrors(<wbr>AllowASTWithCompilerErrors),<br class="m_-2933496869566287070gmail_msg">
       AllowConfigurationMismatch(<wbr>AllowConfigurationMismatch),<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/lib/Serialization/<wbr>ASTWriter.cpp<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/<wbr>Serialization/ASTWriter.cpp?<wbr>rev=298185&r1=298184&r2=<wbr>298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/lib/Serialization/<wbr>ASTWriter.cpp (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/lib/Serialization/<wbr>ASTWriter.cpp Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -35,7 +35,6 @@<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/<wbr>FileSystemOptions.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/LLVM.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/LangOptions.h"<br class="m_-2933496869566287070gmail_msg">
-#include "clang/Basic/<wbr>MemoryBufferCache.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/Module.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/ObjCRuntime.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/SourceManager.h"<br class="m_-2933496869566287070gmail_msg">
@@ -4305,11 +4304,10 @@ void ASTWriter::SetSelectorOffset(<wbr>Select<br class="m_-2933496869566287070gmail_msg">
 }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
 ASTWriter::ASTWriter(llvm::<wbr>BitstreamWriter &Stream,<br class="m_-2933496869566287070gmail_msg">
-                     SmallVectorImpl<char> &Buffer, MemoryBufferCache &PCMCache,<br class="m_-2933496869566287070gmail_msg">
+                     SmallVectorImpl<char> &Buffer,<br class="m_-2933496869566287070gmail_msg">
                      ArrayRef<std::shared_ptr<<wbr>ModuleFileExtension>> Extensions,<br class="m_-2933496869566287070gmail_msg">
                      bool IncludeTimestamps)<br class="m_-2933496869566287070gmail_msg">
-    : Stream(Stream), Buffer(Buffer), PCMCache(PCMCache),<br class="m_-2933496869566287070gmail_msg">
-      IncludeTimestamps(<wbr>IncludeTimestamps) {<br class="m_-2933496869566287070gmail_msg">
+    : Stream(Stream), Buffer(Buffer), IncludeTimestamps(<wbr>IncludeTimestamps) {<br class="m_-2933496869566287070gmail_msg">
   for (const auto &Ext : Extensions) {<br class="m_-2933496869566287070gmail_msg">
     if (auto Writer = Ext->createExtensionWriter(*<wbr>this))<br class="m_-2933496869566287070gmail_msg">
       ModuleFileExtensionWriters.<wbr>push_back(std::move(Writer));<br class="m_-2933496869566287070gmail_msg">
@@ -4356,12 +4354,6 @@ ASTFileSignature ASTWriter::WriteAST(Sem<br class="m_-2933496869566287070gmail_msg">
   this->BaseDirectory.clear();<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   WritingAST = false;<br class="m_-2933496869566287070gmail_msg">
-  if (SemaRef.Context.getLangOpts()<wbr>.ImplicitModules && WritingModule) {<br class="m_-2933496869566287070gmail_msg">
-    // Construct MemoryBuffer and update buffer manager.<br class="m_-2933496869566287070gmail_msg">
-    PCMCache.addBuffer(OutputFile,<br class="m_-2933496869566287070gmail_msg">
-                       llvm::MemoryBuffer::<wbr>getMemBufferCopy(<br class="m_-2933496869566287070gmail_msg">
-                           StringRef(Buffer.begin(), Buffer.size())));<br class="m_-2933496869566287070gmail_msg">
-  }<br class="m_-2933496869566287070gmail_msg">
   return Signature;<br class="m_-2933496869566287070gmail_msg">
 }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/lib/Serialization/<wbr>GeneratePCH.cpp<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/GeneratePCH.cpp?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/<wbr>Serialization/GeneratePCH.cpp?<wbr>rev=298185&r1=298184&r2=<wbr>298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/lib/Serialization/<wbr>GeneratePCH.cpp (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/lib/Serialization/<wbr>GeneratePCH.cpp Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -28,8 +28,7 @@ PCHGenerator::PCHGenerator(<br class="m_-2933496869566287070gmail_msg">
     bool AllowASTWithErrors, bool IncludeTimestamps)<br class="m_-2933496869566287070gmail_msg">
     : PP(PP), OutputFile(OutputFile), isysroot(isysroot.str()),<br class="m_-2933496869566287070gmail_msg">
       SemaPtr(nullptr), Buffer(Buffer), Stream(Buffer->Data),<br class="m_-2933496869566287070gmail_msg">
-      Writer(Stream, Buffer->Data, PP.getPCMCache(), Extensions,<br class="m_-2933496869566287070gmail_msg">
-             IncludeTimestamps),<br class="m_-2933496869566287070gmail_msg">
+      Writer(Stream, Buffer->Data, Extensions, IncludeTimestamps),<br class="m_-2933496869566287070gmail_msg">
       AllowASTWithErrors(<wbr>AllowASTWithErrors) {<br class="m_-2933496869566287070gmail_msg">
   Buffer->IsComplete = false;<br class="m_-2933496869566287070gmail_msg">
 }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/lib/Serialization/<wbr>ModuleManager.cpp<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ModuleManager.cpp?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/<wbr>Serialization/ModuleManager.<wbr>cpp?rev=298185&r1=298184&r2=<wbr>298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/lib/Serialization/<wbr>ModuleManager.cpp (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/lib/Serialization/<wbr>ModuleManager.cpp Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -12,7 +12,6 @@<br class="m_-2933496869566287070gmail_msg">
 //<br class="m_-2933496869566287070gmail_msg">
 //===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Serialization/<wbr>ModuleManager.h"<br class="m_-2933496869566287070gmail_msg">
-#include "clang/Basic/<wbr>MemoryBufferCache.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Frontend/<wbr>PCHContainerOperations.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Lex/HeaderSearch.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Lex/ModuleMap.h"<br class="m_-2933496869566287070gmail_msg">
@@ -138,9 +137,7 @@ ModuleManager::addModule(<wbr>StringRef FileN<br class="m_-2933496869566287070gmail_msg">
   // Load the contents of the module<br class="m_-2933496869566287070gmail_msg">
   if (std::unique_ptr<llvm::<wbr>MemoryBuffer> Buffer = lookupBuffer(FileName)) {<br class="m_-2933496869566287070gmail_msg">
     // The buffer was already provided for us.<br class="m_-2933496869566287070gmail_msg">
-    NewModule->Buffer = &PCMCache->addBuffer(FileName, std::move(Buffer));<br class="m_-2933496869566287070gmail_msg">
-  } else if (llvm::MemoryBuffer *Buffer = PCMCache->lookupBuffer(<wbr>FileName)) {<br class="m_-2933496869566287070gmail_msg">
-    NewModule->Buffer = Buffer;<br class="m_-2933496869566287070gmail_msg">
+    NewModule->Buffer = std::move(Buffer);<br class="m_-2933496869566287070gmail_msg">
   } else {<br class="m_-2933496869566287070gmail_msg">
     // Open the AST file.<br class="m_-2933496869566287070gmail_msg">
     llvm::ErrorOr<std::unique_<wbr>ptr<llvm::MemoryBuffer>> Buf((std::error_code()));<br class="m_-2933496869566287070gmail_msg">
@@ -161,7 +158,7 @@ ModuleManager::addModule(<wbr>StringRef FileN<br class="m_-2933496869566287070gmail_msg">
       return Missing;<br class="m_-2933496869566287070gmail_msg">
     }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
-    NewModule->Buffer = &PCMCache->addBuffer(FileName, std::move(*Buf));<br class="m_-2933496869566287070gmail_msg">
+    NewModule->Buffer = std::move(*Buf);<br class="m_-2933496869566287070gmail_msg">
   }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   // Initialize the stream.<br class="m_-2933496869566287070gmail_msg">
@@ -170,13 +167,8 @@ ModuleManager::addModule(<wbr>StringRef FileN<br class="m_-2933496869566287070gmail_msg">
   // Read the signature eagerly now so that we can check it.  Avoid calling<br class="m_-2933496869566287070gmail_msg">
   // ReadSignature unless there's something to check though.<br class="m_-2933496869566287070gmail_msg">
   if (ExpectedSignature && checkSignature(ReadSignature(<wbr>NewModule->Data),<br class="m_-2933496869566287070gmail_msg">
-                                          ExpectedSignature, ErrorStr)) {<br class="m_-2933496869566287070gmail_msg">
-    // Try to remove the buffer.  If it can't be removed, then it was already<br class="m_-2933496869566287070gmail_msg">
-    // validated by this process.<br class="m_-2933496869566287070gmail_msg">
-    if (!PCMCache->tryToRemoveBuffer(<wbr>NewModule->FileName))<br class="m_-2933496869566287070gmail_msg">
-      FileMgr.invalidateCache(<wbr>NewModule->File);<br class="m_-2933496869566287070gmail_msg">
+                                          ExpectedSignature, ErrorStr))<br class="m_-2933496869566287070gmail_msg">
     return OutOfDate;<br class="m_-2933496869566287070gmail_msg">
-  }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   // We're keeping this module.  Store it everywhere.<br class="m_-2933496869566287070gmail_msg">
   Module = Modules[Entry] = NewModule.get();<br class="m_-2933496869566287070gmail_msg">
@@ -243,12 +235,7 @@ void ModuleManager::removeModules(<br class="m_-2933496869566287070gmail_msg">
     // Files that didn't make it through ReadASTCore successfully will be<br class="m_-2933496869566287070gmail_msg">
     // rebuilt (or there was an error). Invalidate them so that we can load the<br class="m_-2933496869566287070gmail_msg">
     // new files that will be renamed over the old ones.<br class="m_-2933496869566287070gmail_msg">
-    //<br class="m_-2933496869566287070gmail_msg">
-    // The PCMCache tracks whether the module was succesfully loaded in another<br class="m_-2933496869566287070gmail_msg">
-    // thread/context; in that case, it won't need to be rebuilt (and we can't<br class="m_-2933496869566287070gmail_msg">
-    // safely invalidate it anyway).<br class="m_-2933496869566287070gmail_msg">
-    if (LoadedSuccessfully.count(&*<wbr>victim) == 0 &&<br class="m_-2933496869566287070gmail_msg">
-        !PCMCache->tryToRemoveBuffer(<wbr>victim->FileName))<br class="m_-2933496869566287070gmail_msg">
+    if (LoadedSuccessfully.count(&*<wbr>victim) == 0)<br class="m_-2933496869566287070gmail_msg">
       FileMgr.invalidateCache(<wbr>victim->File);<br class="m_-2933496869566287070gmail_msg">
   }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
@@ -305,10 +292,10 @@ void ModuleManager::<wbr>moduleFileAccepted(M<br class="m_-2933496869566287070gmail_msg">
   <wbr>ModulesInCommonWithGlobalIndex<wbr>.push_back(MF);<br class="m_-2933496869566287070gmail_msg">
 }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
-ModuleManager::ModuleManager(<wbr>FileManager &FileMgr, MemoryBufferCache &PCMCache,<br class="m_-2933496869566287070gmail_msg">
+ModuleManager::ModuleManager(<wbr>FileManager &FileMgr,<br class="m_-2933496869566287070gmail_msg">
                              const PCHContainerReader &PCHContainerRdr)<br class="m_-2933496869566287070gmail_msg">
-    : FileMgr(FileMgr), PCMCache(&PCMCache), PCHContainerRdr(<wbr>PCHContainerRdr),<br class="m_-2933496869566287070gmail_msg">
-      GlobalIndex(), FirstVisitState(nullptr) {}<br class="m_-2933496869566287070gmail_msg">
+    : FileMgr(FileMgr), PCHContainerRdr(<wbr>PCHContainerRdr), GlobalIndex(),<br class="m_-2933496869566287070gmail_msg">
+      FirstVisitState(nullptr) {}<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
 ModuleManager::~<wbr>ModuleManager() { delete FirstVisitState; }<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed: cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/X.h<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/system-out-of-date/X.h?rev=298184&view=auto" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/<wbr>Modules/Inputs/system-out-of-<wbr>date/X.h?rev=298184&view=auto</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/X.h (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/X.h (removed)<br class="m_-2933496869566287070gmail_msg">
@@ -1 +0,0 @@<br class="m_-2933496869566287070gmail_msg">
-#import <Y.h><br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed: cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/Y.h<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/system-out-of-date/Y.h?rev=298184&view=auto" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/<wbr>Modules/Inputs/system-out-of-<wbr>date/Y.h?rev=298184&view=auto</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/Y.h (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/Y.h (removed)<br class="m_-2933496869566287070gmail_msg">
@@ -1 +0,0 @@<br class="m_-2933496869566287070gmail_msg">
-//empty<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed: cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/Z.h<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/system-out-of-date/Z.h?rev=298184&view=auto" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/<wbr>Modules/Inputs/system-out-of-<wbr>date/Z.h?rev=298184&view=auto</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/Z.h (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/Z.h (removed)<br class="m_-2933496869566287070gmail_msg">
@@ -1 +0,0 @@<br class="m_-2933496869566287070gmail_msg">
-#import <Y.h><br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed: cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/module.map<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/system-out-of-date/module.map?rev=298184&view=auto" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/<wbr>Modules/Inputs/system-out-of-<wbr>date/module.map?rev=298184&<wbr>view=auto</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/module.map (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/test/Modules/Inputs/<wbr>system-out-of-date/module.map (removed)<br class="m_-2933496869566287070gmail_msg">
@@ -1,12 +0,0 @@<br class="m_-2933496869566287070gmail_msg">
-module X [system] {<br class="m_-2933496869566287070gmail_msg">
-  header "X.h" // imports Y<br class="m_-2933496869566287070gmail_msg">
-  export *<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
-module Y {<br class="m_-2933496869566287070gmail_msg">
-  header "Y.h"<br class="m_-2933496869566287070gmail_msg">
-  export *<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
-module Z {<br class="m_-2933496869566287070gmail_msg">
-  header "Z.h" // imports Y<br class="m_-2933496869566287070gmail_msg">
-  export *<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed: cfe/trunk/test/Modules/Inputs/<wbr>warning-mismatch/Mismatch.h<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/warning-mismatch/Mismatch.h?rev=298184&view=auto" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/<wbr>Modules/Inputs/warning-<wbr>mismatch/Mismatch.h?rev=<wbr>298184&view=auto</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/test/Modules/Inputs/<wbr>warning-mismatch/Mismatch.h (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/test/Modules/Inputs/<wbr>warning-mismatch/Mismatch.h (removed)<br class="m_-2933496869566287070gmail_msg">
@@ -1 +0,0 @@<br class="m_-2933496869566287070gmail_msg">
-struct Mismatch { int i; };<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed: cfe/trunk/test/Modules/Inputs/<wbr>warning-mismatch/System.h<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/warning-mismatch/System.h?rev=298184&view=auto" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/<wbr>Modules/Inputs/warning-<wbr>mismatch/System.h?rev=298184&<wbr>view=auto</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/test/Modules/Inputs/<wbr>warning-mismatch/System.h (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/test/Modules/Inputs/<wbr>warning-mismatch/System.h (removed)<br class="m_-2933496869566287070gmail_msg">
@@ -1,2 +0,0 @@<br class="m_-2933496869566287070gmail_msg">
-#import "Mismatch.h"<br class="m_-2933496869566287070gmail_msg">
-struct System { int i; };<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed: cfe/trunk/test/Modules/Inputs/<wbr>warning-mismatch/module.<wbr>modulemap<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/warning-mismatch/module.modulemap?rev=298184&view=auto" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/<wbr>Modules/Inputs/warning-<wbr>mismatch/module.modulemap?rev=<wbr>298184&view=auto</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/test/Modules/Inputs/<wbr>warning-mismatch/module.<wbr>modulemap (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/test/Modules/Inputs/<wbr>warning-mismatch/module.<wbr>modulemap (removed)<br class="m_-2933496869566287070gmail_msg">
@@ -1,7 +0,0 @@<br class="m_-2933496869566287070gmail_msg">
-module System [system] {<br class="m_-2933496869566287070gmail_msg">
-  header "System.h"<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-module Mismatch {<br class="m_-2933496869566287070gmail_msg">
-  header "Mismatch.h"<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed: cfe/trunk/test/Modules/<wbr>outofdate-rebuild.m<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/outofdate-rebuild.m?rev=298184&view=auto" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/<wbr>Modules/outofdate-rebuild.m?<wbr>rev=298184&view=auto</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/test/Modules/<wbr>outofdate-rebuild.m (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/test/Modules/<wbr>outofdate-rebuild.m (removed)<br class="m_-2933496869566287070gmail_msg">
@@ -1,15 +0,0 @@<br class="m_-2933496869566287070gmail_msg">
-// RUN: rm -rf %t.cache<br class="m_-2933496869566287070gmail_msg">
-// RUN: echo "@import CoreText;" > %t.m<br class="m_-2933496869566287070gmail_msg">
-// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t.cache \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   -fmodules -fimplicit-module-maps -I%S/Inputs/outofdate-rebuild %s \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   -fsyntax-only<br class="m_-2933496869566287070gmail_msg">
-// RUN: %clang_cc1 -DMISMATCH -Werror -fdisable-module-hash \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   -fmodules-cache-path=%t.cache -fmodules -fimplicit-module-maps \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   -I%S/Inputs/outofdate-rebuild %t.m -fsyntax-only<br class="m_-2933496869566287070gmail_msg">
-// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t.cache \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   -fmodules -fimplicit-module-maps -I%S/Inputs/outofdate-rebuild %s \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   -fsyntax-only<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-// This testcase reproduces a use-after-free in when ModuleManager removes an<br class="m_-2933496869566287070gmail_msg">
-// entry from the PCMCache without notifying its parent ASTReader.<br class="m_-2933496869566287070gmail_msg">
-@import Cocoa;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed: cfe/trunk/test/Modules/system-<wbr>out-of-date-test.m<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/system-out-of-date-test.m?rev=298184&view=auto" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/<wbr>Modules/system-out-of-date-<wbr>test.m?rev=298184&view=auto</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/test/Modules/system-<wbr>out-of-date-test.m (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/test/Modules/system-<wbr>out-of-date-test.m (removed)<br class="m_-2933496869566287070gmail_msg">
@@ -1,17 +0,0 @@<br class="m_-2933496869566287070gmail_msg">
-// RUN: rm -rf %t.cache<br class="m_-2933496869566287070gmail_msg">
-// RUN: echo '@import X;' | \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   %clang_cc1 -fmodules -fimplicit-module-maps \<br class="m_-2933496869566287070gmail_msg">
-// RUN:     -fmodules-cache-path=%t.cache -I%S/Inputs/system-out-of-date \<br class="m_-2933496869566287070gmail_msg">
-// RUN:     -fsyntax-only -x objective-c -<br class="m_-2933496869566287070gmail_msg">
-//<br class="m_-2933496869566287070gmail_msg">
-// Build something with different diagnostic options.<br class="m_-2933496869566287070gmail_msg">
-// RUN: %clang_cc1 -fmodules -fimplicit-module-maps \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   -fmodules-cache-path=%t.cache -I%S/Inputs/system-out-of-date \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   -fsyntax-only %s -Wnon-modular-include-in-<wbr>framework-module \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   -Werror=non-modular-include-<wbr>in-framework-module 2>&1 \<br class="m_-2933496869566287070gmail_msg">
-// RUN: | FileCheck %s<br class="m_-2933496869566287070gmail_msg">
-@import X;<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-#import <Z.h><br class="m_-2933496869566287070gmail_msg">
-// CHECK: While building module 'Z' imported from<br class="m_-2933496869566287070gmail_msg">
-// CHECK: {{.*}}Y-{{.*}}pcm' was validated as a system module and is now being imported as a non-system module<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed: cfe/trunk/test/Modules/<wbr>warning-mismatch.m<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/warning-mismatch.m?rev=298184&view=auto" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/<wbr>Modules/warning-mismatch.m?<wbr>rev=298184&view=auto</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/test/Modules/<wbr>warning-mismatch.m (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/test/Modules/<wbr>warning-mismatch.m (removed)<br class="m_-2933496869566287070gmail_msg">
@@ -1,13 +0,0 @@<br class="m_-2933496869566287070gmail_msg">
-// RUN: rm -rf %t.cache<br class="m_-2933496869566287070gmail_msg">
-// RUN: echo "@import Mismatch;" >%t.m<br class="m_-2933496869566287070gmail_msg">
-// RUN: %clang_cc1 -Wno-system-headers -fdisable-module-hash \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   -fmodules-cache-path=%t.cache -fmodules -fimplicit-module-maps \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   -I%S/Inputs/warning-mismatch %t.m -fsyntax-only<br class="m_-2933496869566287070gmail_msg">
-// RUN: %clang_cc1 -Wsystem-headers -fdisable-module-hash \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   -fmodules-cache-path=%t.cache -fmodules -fimplicit-module-maps \<br class="m_-2933496869566287070gmail_msg">
-// RUN:   -I%S/Inputs/warning-mismatch %s -fsyntax-only<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-// This testcase triggers a warning flag mismatch in an already validated<br class="m_-2933496869566287070gmail_msg">
-// header.<br class="m_-2933496869566287070gmail_msg">
-@import Mismatch;<br class="m_-2933496869566287070gmail_msg">
-@import System;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/unittests/Basic/<wbr>CMakeLists.txt<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Basic/CMakeLists.txt?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/unittests/<wbr>Basic/CMakeLists.txt?rev=<wbr>298185&r1=298184&r2=298185&<wbr>view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/unittests/Basic/<wbr>CMakeLists.txt (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/unittests/Basic/<wbr>CMakeLists.txt Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -6,7 +6,6 @@ add_clang_unittest(BasicTests<br class="m_-2933496869566287070gmail_msg">
   CharInfoTest.cpp<br class="m_-2933496869566287070gmail_msg">
   DiagnosticTest.cpp<br class="m_-2933496869566287070gmail_msg">
   FileManagerTest.cpp<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCacheTest.cpp<br class="m_-2933496869566287070gmail_msg">
   SourceManagerTest.cpp<br class="m_-2933496869566287070gmail_msg">
   VirtualFileSystemTest.cpp<br class="m_-2933496869566287070gmail_msg">
   )<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Removed: cfe/trunk/unittests/Basic/<wbr>MemoryBufferCacheTest.cpp<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Basic/MemoryBufferCacheTest.cpp?rev=298184&view=auto" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/unittests/<wbr>Basic/MemoryBufferCacheTest.<wbr>cpp?rev=298184&view=auto</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/unittests/Basic/<wbr>MemoryBufferCacheTest.cpp (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/unittests/Basic/<wbr>MemoryBufferCacheTest.cpp (removed)<br class="m_-2933496869566287070gmail_msg">
@@ -1,94 +0,0 @@<br class="m_-2933496869566287070gmail_msg">
-//===- MemoryBufferCacheTest.cpp - MemoryBufferCache tests ----------------===//<br class="m_-2933496869566287070gmail_msg">
-//<br class="m_-2933496869566287070gmail_msg">
-//                     The LLVM Compiler Infrastructure<br class="m_-2933496869566287070gmail_msg">
-//<br class="m_-2933496869566287070gmail_msg">
-// This file is distributed under the University of Illinois Open Source<br class="m_-2933496869566287070gmail_msg">
-// License. See LICENSE.TXT for details.<br class="m_-2933496869566287070gmail_msg">
-//<br class="m_-2933496869566287070gmail_msg">
-//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-#include "clang/Basic/<wbr>MemoryBufferCache.h"<br class="m_-2933496869566287070gmail_msg">
-#include "llvm/Support/MemoryBuffer.h"<br class="m_-2933496869566287070gmail_msg">
-#include "gtest/gtest.h"<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-using namespace llvm;<br class="m_-2933496869566287070gmail_msg">
-using namespace clang;<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-namespace {<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-std::unique_ptr<MemoryBuffer> getBuffer(int I) {<br class="m_-2933496869566287070gmail_msg">
-  SmallVector<char, 8> Bytes;<br class="m_-2933496869566287070gmail_msg">
-  raw_svector_ostream(Bytes) << "data:" << I;<br class="m_-2933496869566287070gmail_msg">
-  return MemoryBuffer::getMemBuffer(<wbr>StringRef(Bytes.data(), Bytes.size()));<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-TEST(MemoryBufferCacheTest, addBuffer) {<br class="m_-2933496869566287070gmail_msg">
-  auto B1 = getBuffer(1);<br class="m_-2933496869566287070gmail_msg">
-  auto B2 = getBuffer(2);<br class="m_-2933496869566287070gmail_msg">
-  auto B3 = getBuffer(3);<br class="m_-2933496869566287070gmail_msg">
-  auto *RawB1 = B1.get();<br class="m_-2933496869566287070gmail_msg">
-  auto *RawB2 = B2.get();<br class="m_-2933496869566287070gmail_msg">
-  auto *RawB3 = B3.get();<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  // Add a few buffers.<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache Cache;<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_EQ(RawB1, &Cache.addBuffer("1", std::move(B1)));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_EQ(RawB2, &Cache.addBuffer("2", std::move(B2)));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_EQ(RawB3, &Cache.addBuffer("3", std::move(B3)));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_EQ(RawB1, Cache.lookupBuffer("1"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_EQ(RawB2, Cache.lookupBuffer("2"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_EQ(RawB3, Cache.lookupBuffer("3"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_FALSE(Cache.<wbr>isBufferFinal("1"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_FALSE(Cache.<wbr>isBufferFinal("2"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_FALSE(Cache.<wbr>isBufferFinal("3"));<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  // Remove the middle buffer.<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_FALSE(Cache.<wbr>tryToRemoveBuffer("2"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_EQ(nullptr, Cache.lookupBuffer("2"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_FALSE(Cache.<wbr>isBufferFinal("2"));<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  // Replace the middle buffer.<br class="m_-2933496869566287070gmail_msg">
-  B2 = getBuffer(2);<br class="m_-2933496869566287070gmail_msg">
-  ASSERT_NE(RawB2, B2.get());<br class="m_-2933496869566287070gmail_msg">
-  RawB2 = B2.get();<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_EQ(RawB2, &Cache.addBuffer("2", std::move(B2)));<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  // Check that nothing is final.<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_FALSE(Cache.<wbr>isBufferFinal("1"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_FALSE(Cache.<wbr>isBufferFinal("2"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_FALSE(Cache.<wbr>isBufferFinal("3"));<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-TEST(MemoryBufferCacheTest, finalizeCurrentBuffers) {<br class="m_-2933496869566287070gmail_msg">
-  // Add a buffer.<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache Cache;<br class="m_-2933496869566287070gmail_msg">
-  auto B1 = getBuffer(1);<br class="m_-2933496869566287070gmail_msg">
-  auto *RawB1 = B1.get();<br class="m_-2933496869566287070gmail_msg">
-  Cache.addBuffer("1", std::move(B1));<br class="m_-2933496869566287070gmail_msg">
-  ASSERT_FALSE(Cache.<wbr>isBufferFinal("1"));<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  // Finalize it.<br class="m_-2933496869566287070gmail_msg">
-  Cache.finalizeCurrentBuffers()<wbr>;<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_TRUE(Cache.<wbr>isBufferFinal("1"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_TRUE(Cache.<wbr>tryToRemoveBuffer("1"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_EQ(RawB1, Cache.lookupBuffer("1"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_TRUE(Cache.<wbr>isBufferFinal("1"));<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  // Repeat.<br class="m_-2933496869566287070gmail_msg">
-  auto B2 = getBuffer(2);<br class="m_-2933496869566287070gmail_msg">
-  auto *RawB2 = B2.get();<br class="m_-2933496869566287070gmail_msg">
-  Cache.addBuffer("2", std::move(B2));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_FALSE(Cache.<wbr>isBufferFinal("2"));<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-  Cache.finalizeCurrentBuffers()<wbr>;<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_TRUE(Cache.<wbr>isBufferFinal("1"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_TRUE(Cache.<wbr>isBufferFinal("2"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_TRUE(Cache.<wbr>tryToRemoveBuffer("1"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_TRUE(Cache.<wbr>tryToRemoveBuffer("2"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_EQ(RawB1, Cache.lookupBuffer("1"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_EQ(RawB2, Cache.lookupBuffer("2"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_TRUE(Cache.<wbr>isBufferFinal("1"));<br class="m_-2933496869566287070gmail_msg">
-  EXPECT_TRUE(Cache.<wbr>isBufferFinal("2"));<br class="m_-2933496869566287070gmail_msg">
-}<br class="m_-2933496869566287070gmail_msg">
-<br class="m_-2933496869566287070gmail_msg">
-} // namespace<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/unittests/Basic/<wbr>SourceManagerTest.cpp<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Basic/SourceManagerTest.cpp?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/unittests/<wbr>Basic/SourceManagerTest.cpp?<wbr>rev=298185&r1=298184&r2=<wbr>298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/unittests/Basic/<wbr>SourceManagerTest.cpp (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/unittests/Basic/<wbr>SourceManagerTest.cpp Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -12,7 +12,6 @@<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/<wbr>DiagnosticOptions.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/FileManager.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/LangOptions.h"<br class="m_-2933496869566287070gmail_msg">
-#include "clang/Basic/<wbr>MemoryBufferCache.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/TargetInfo.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/TargetOptions.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Lex/HeaderSearch.h"<br class="m_-2933496869566287070gmail_msg">
@@ -79,11 +78,10 @@ TEST_F(SourceManagerTest, isBeforeInTran<br class="m_-2933496869566287070gmail_msg">
   SourceMgr.setMainFileID(<wbr>mainFileID);<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   VoidModuleLoader ModLoader;<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache PCMCache;<br class="m_-2933496869566287070gmail_msg">
   HeaderSearch HeaderInfo(std::make_shared<<wbr>HeaderSearchOptions>(), SourceMgr,<br class="m_-2933496869566287070gmail_msg">
                           Diags, LangOpts, &*Target);<br class="m_-2933496869566287070gmail_msg">
   Preprocessor PP(std::make_shared<<wbr>PreprocessorOptions>(), Diags, LangOpts,<br class="m_-2933496869566287070gmail_msg">
-                  SourceMgr, PCMCache, HeaderInfo, ModLoader,<br class="m_-2933496869566287070gmail_msg">
+                  SourceMgr, HeaderInfo, ModLoader,<br class="m_-2933496869566287070gmail_msg">
                   /*IILookup =*/nullptr,<br class="m_-2933496869566287070gmail_msg">
                   /*OwnsHeaderSearch =*/false);<br class="m_-2933496869566287070gmail_msg">
   PP.Initialize(*Target);<br class="m_-2933496869566287070gmail_msg">
@@ -200,11 +198,10 @@ TEST_F(SourceManagerTest, getMacroArgExp<br class="m_-2933496869566287070gmail_msg">
   SourceMgr.<wbr>overrideFileContents(<wbr>headerFile, std::move(HeaderBuf));<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   VoidModuleLoader ModLoader;<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache PCMCache;<br class="m_-2933496869566287070gmail_msg">
   HeaderSearch HeaderInfo(std::make_shared<<wbr>HeaderSearchOptions>(), SourceMgr,<br class="m_-2933496869566287070gmail_msg">
                           Diags, LangOpts, &*Target);<br class="m_-2933496869566287070gmail_msg">
   Preprocessor PP(std::make_shared<<wbr>PreprocessorOptions>(), Diags, LangOpts,<br class="m_-2933496869566287070gmail_msg">
-                  SourceMgr, PCMCache, HeaderInfo, ModLoader,<br class="m_-2933496869566287070gmail_msg">
+                  SourceMgr, HeaderInfo, ModLoader,<br class="m_-2933496869566287070gmail_msg">
                   /*IILookup =*/nullptr,<br class="m_-2933496869566287070gmail_msg">
                   /*OwnsHeaderSearch =*/false);<br class="m_-2933496869566287070gmail_msg">
   PP.Initialize(*Target);<br class="m_-2933496869566287070gmail_msg">
@@ -301,11 +298,10 @@ TEST_F(SourceManagerTest, isBeforeInTran<br class="m_-2933496869566287070gmail_msg">
   SourceMgr.<wbr>overrideFileContents(<wbr>headerFile, std::move(HeaderBuf));<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   VoidModuleLoader ModLoader;<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache PCMCache;<br class="m_-2933496869566287070gmail_msg">
   HeaderSearch HeaderInfo(std::make_shared<<wbr>HeaderSearchOptions>(), SourceMgr,<br class="m_-2933496869566287070gmail_msg">
                           Diags, LangOpts, &*Target);<br class="m_-2933496869566287070gmail_msg">
   Preprocessor PP(std::make_shared<<wbr>PreprocessorOptions>(), Diags, LangOpts,<br class="m_-2933496869566287070gmail_msg">
-                  SourceMgr, PCMCache, HeaderInfo, ModLoader,<br class="m_-2933496869566287070gmail_msg">
+                  SourceMgr, HeaderInfo, ModLoader,<br class="m_-2933496869566287070gmail_msg">
                   /*IILookup =*/nullptr,<br class="m_-2933496869566287070gmail_msg">
                   /*OwnsHeaderSearch =*/false);<br class="m_-2933496869566287070gmail_msg">
   PP.Initialize(*Target);<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/unittests/Lex/<wbr>LexerTest.cpp<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Lex/LexerTest.cpp?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/unittests/<wbr>Lex/LexerTest.cpp?rev=298185&<wbr>r1=298184&r2=298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/unittests/Lex/<wbr>LexerTest.cpp (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/unittests/Lex/<wbr>LexerTest.cpp Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -12,7 +12,6 @@<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/<wbr>DiagnosticOptions.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/FileManager.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/LangOptions.h"<br class="m_-2933496869566287070gmail_msg">
-#include "clang/Basic/<wbr>MemoryBufferCache.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/SourceManager.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/TargetInfo.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/TargetOptions.h"<br class="m_-2933496869566287070gmail_msg">
@@ -65,12 +64,10 @@ protected:<br class="m_-2933496869566287070gmail_msg">
     SourceMgr.setMainFileID(<wbr>SourceMgr.createFileID(std::<wbr>move(Buf)));<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
     VoidModuleLoader ModLoader;<br class="m_-2933496869566287070gmail_msg">
-    MemoryBufferCache PCMCache;<br class="m_-2933496869566287070gmail_msg">
     HeaderSearch HeaderInfo(std::make_shared<<wbr>HeaderSearchOptions>(), SourceMgr,<br class="m_-2933496869566287070gmail_msg">
                             Diags, LangOpts, Target.get());<br class="m_-2933496869566287070gmail_msg">
     Preprocessor PP(std::make_shared<<wbr>PreprocessorOptions>(), Diags, LangOpts,<br class="m_-2933496869566287070gmail_msg">
-                    SourceMgr, PCMCache, HeaderInfo, ModLoader,<br class="m_-2933496869566287070gmail_msg">
-                    /*IILookup =*/nullptr,<br class="m_-2933496869566287070gmail_msg">
+                    SourceMgr, HeaderInfo, ModLoader, /*IILookup =*/nullptr,<br class="m_-2933496869566287070gmail_msg">
                     /*OwnsHeaderSearch =*/false);<br class="m_-2933496869566287070gmail_msg">
     PP.Initialize(*Target);<br class="m_-2933496869566287070gmail_msg">
     PP.EnterMainSourceFile();<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/unittests/Lex/<wbr>PPCallbacksTest.cpp<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Lex/PPCallbacksTest.cpp?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/unittests/<wbr>Lex/PPCallbacksTest.cpp?rev=<wbr>298185&r1=298184&r2=298185&<wbr>view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/unittests/Lex/<wbr>PPCallbacksTest.cpp (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/unittests/Lex/<wbr>PPCallbacksTest.cpp Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -14,7 +14,6 @@<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/<wbr>DiagnosticOptions.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/FileManager.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/LangOptions.h"<br class="m_-2933496869566287070gmail_msg">
-#include "clang/Basic/<wbr>MemoryBufferCache.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/SourceManager.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/TargetInfo.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/TargetOptions.h"<br class="m_-2933496869566287070gmail_msg">
@@ -162,14 +161,13 @@ protected:<br class="m_-2933496869566287070gmail_msg">
     SourceMgr.setMainFileID(<wbr>SourceMgr.createFileID(std::<wbr>move(Buf)));<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
     VoidModuleLoader ModLoader;<br class="m_-2933496869566287070gmail_msg">
-    MemoryBufferCache PCMCache;<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
     HeaderSearch HeaderInfo(std::make_shared<<wbr>HeaderSearchOptions>(), SourceMgr,<br class="m_-2933496869566287070gmail_msg">
                             Diags, LangOpts, Target.get());<br class="m_-2933496869566287070gmail_msg">
     AddFakeHeader(HeaderInfo, HeaderPath, SystemHeader);<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
     Preprocessor PP(std::make_shared<<wbr>PreprocessorOptions>(), Diags, LangOpts,<br class="m_-2933496869566287070gmail_msg">
-                    SourceMgr, PCMCache, HeaderInfo, ModLoader,<br class="m_-2933496869566287070gmail_msg">
+                    SourceMgr, HeaderInfo, ModLoader,<br class="m_-2933496869566287070gmail_msg">
                     /*IILookup =*/nullptr,<br class="m_-2933496869566287070gmail_msg">
                     /*OwnsHeaderSearch =*/false);<br class="m_-2933496869566287070gmail_msg">
     PP.Initialize(*Target);<br class="m_-2933496869566287070gmail_msg">
@@ -200,12 +198,11 @@ protected:<br class="m_-2933496869566287070gmail_msg">
     SourceMgr.setMainFileID(<wbr>SourceMgr.createFileID(std::<wbr>move(SourceBuf)));<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
     VoidModuleLoader ModLoader;<br class="m_-2933496869566287070gmail_msg">
-    MemoryBufferCache PCMCache;<br class="m_-2933496869566287070gmail_msg">
     HeaderSearch HeaderInfo(std::make_shared<<wbr>HeaderSearchOptions>(), SourceMgr,<br class="m_-2933496869566287070gmail_msg">
                             Diags, OpenCLLangOpts, Target.get());<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
     Preprocessor PP(std::make_shared<<wbr>PreprocessorOptions>(), Diags,<br class="m_-2933496869566287070gmail_msg">
-                    OpenCLLangOpts, SourceMgr, PCMCache, HeaderInfo, ModLoader,<br class="m_-2933496869566287070gmail_msg">
+                    OpenCLLangOpts, SourceMgr, HeaderInfo, ModLoader,<br class="m_-2933496869566287070gmail_msg">
                     /*IILookup =*/nullptr,<br class="m_-2933496869566287070gmail_msg">
                     /*OwnsHeaderSearch =*/false);<br class="m_-2933496869566287070gmail_msg">
     PP.Initialize(*Target);<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
Modified: cfe/trunk/unittests/Lex/<wbr>PPConditionalDirectiveRecordTe<wbr>st.cpp<br class="m_-2933496869566287070gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Lex/PPConditionalDirectiveRecordTest.cpp?rev=298185&r1=298184&r2=298185&view=diff" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/unittests/<wbr>Lex/<wbr>PPConditionalDirectiveRecordTe<wbr>st.cpp?rev=298185&r1=298184&<wbr>r2=298185&view=diff</a><br class="m_-2933496869566287070gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_-2933496869566287070gmail_msg">
--- cfe/trunk/unittests/Lex/<wbr>PPConditionalDirectiveRecordTe<wbr>st.cpp (original)<br class="m_-2933496869566287070gmail_msg">
+++ cfe/trunk/unittests/Lex/<wbr>PPConditionalDirectiveRecordTe<wbr>st.cpp Sat Mar 18 07:31:32 2017<br class="m_-2933496869566287070gmail_msg">
@@ -12,7 +12,6 @@<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/<wbr>DiagnosticOptions.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/FileManager.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/LangOptions.h"<br class="m_-2933496869566287070gmail_msg">
-#include "clang/Basic/<wbr>MemoryBufferCache.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/SourceManager.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/TargetInfo.h"<br class="m_-2933496869566287070gmail_msg">
 #include "clang/Basic/TargetOptions.h"<br class="m_-2933496869566287070gmail_msg">
@@ -94,11 +93,10 @@ TEST_F(<wbr>PPConditionalDirectiveRecordTe<wbr>st,<br class="m_-2933496869566287070gmail_msg">
   SourceMgr.setMainFileID(<wbr>SourceMgr.createFileID(std::<wbr>move(Buf)));<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
   VoidModuleLoader ModLoader;<br class="m_-2933496869566287070gmail_msg">
-  MemoryBufferCache PCMCache;<br class="m_-2933496869566287070gmail_msg">
   HeaderSearch HeaderInfo(std::make_shared<<wbr>HeaderSearchOptions>(), SourceMgr,<br class="m_-2933496869566287070gmail_msg">
                           Diags, LangOpts, Target.get());<br class="m_-2933496869566287070gmail_msg">
   Preprocessor PP(std::make_shared<<wbr>PreprocessorOptions>(), Diags, LangOpts,<br class="m_-2933496869566287070gmail_msg">
-                  SourceMgr, PCMCache, HeaderInfo, ModLoader,<br class="m_-2933496869566287070gmail_msg">
+                  SourceMgr, HeaderInfo, ModLoader,<br class="m_-2933496869566287070gmail_msg">
                   /*IILookup =*/nullptr,<br class="m_-2933496869566287070gmail_msg">
                   /*OwnsHeaderSearch =*/false);<br class="m_-2933496869566287070gmail_msg">
   PP.Initialize(*Target);<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
<br class="m_-2933496869566287070gmail_msg">
______________________________<wbr>_________________<br class="m_-2933496869566287070gmail_msg">
cfe-commits mailing list<br class="m_-2933496869566287070gmail_msg">
<a href="mailto:cfe-commits@lists.llvm.org" class="m_-2933496869566287070gmail_msg" target="_blank">cfe-commits@lists.llvm.org</a><br class="m_-2933496869566287070gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" class="m_-2933496869566287070gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br class="m_-2933496869566287070gmail_msg">
</blockquote></div>
</blockquote></div></div>