llvm-project/clang/lib/Serialization
Duncan P. N. Exon Smith e1b7f22b34 ASTReader: Bypass overridden files when reading PCHs
If contents of a file that is part of a PCM are overridden when reading
it, but weren't overridden when the PCM was being built, the ASTReader
will emit an error.  Now it creates a separate FileEntry for recovery,
bypassing the overridden content instead of discarding it.  The
pre-existing testcase clang/test/PCH/remap-file-from-pch.cpp confirms
that the new recovery method works correctly.

This resolves a long-standing FIXME to avoid hypothetically invalidating
another precompiled module that's already using the overridden contents.

This also removes ContentCache-related API that would be unsafe to use
across `CompilerInstance`s in an implicit modules build.  This helps to
unblock us sinking it from SourceManager into FileManager in the future,
which would allow us to delete `InMemoryModuleCache`.

https://reviews.llvm.org/D66710

llvm-svn: 370546
2019-08-30 22:59:25 +00:00
..
ASTCommon.cpp Add SVE opaque built-in types 2019-08-09 08:52:54 +00:00
ASTCommon.h [OPENMP 5.0]Add initial support for 'allocate' directive. 2019-03-07 17:54:44 +00:00
ASTReader.cpp ASTReader: Bypass overridden files when reading PCHs 2019-08-30 22:59:25 +00:00
ASTReaderDecl.cpp [OPENMP5.0]Add support for device_type clause in declare target 2019-08-23 16:11:14 +00:00
ASTReaderInternals.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ASTReaderStmt.cpp [OPENMP]Support for non-rectangular loops. 2019-08-14 19:30:06 +00:00
ASTWriter.cpp ContentCache: Drop getBuffer's dependency on SourceManager 2019-08-26 20:32:05 +00:00
ASTWriterDecl.cpp Revert "[Sema] Diagnose default-initialization, destruction, and copying of" 2019-07-26 00:02:17 +00:00
ASTWriterStmt.cpp [OPENMP]Support for non-rectangular loops. 2019-08-14 19:30:06 +00:00
CMakeLists.txt [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00
GeneratePCH.cpp [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00
GlobalModuleIndex.cpp [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
InMemoryModuleCache.cpp Modules: Invalidate out-of-date PCMs as they're discovered 2019-03-09 17:44:01 +00:00
Module.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ModuleFileExtension.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ModuleManager.cpp FileManager: Remove ShouldCloseOpenFile argument from getBufferForFile, NFC 2019-08-30 16:56:26 +00:00
MultiOnDiskHashTable.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PCHContainerOperations.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00