llvm-project/clang/lib/Serialization
Manman Ren ffd3e9d766 PCH: fix a regression that reports a module is defined in both pch and pcm.
In r276159, we started to say that a module X is defined in a pch if we specify
-fmodule-name when building the pch. This caused a regression that reports
module X is defined in both pch and pcm if we generate the pch with
-fmodule-name=X and then in a separate clang invocation, we include the pch and
also import X.pcm.

This patch adds an option CompilingPCH similar to CompilingModule. When we use
-fmodule-name=X while building a pch, modular headers in X will be textually
included and the compiler knows that we are not building module X, so we don't
put module X in SUBMODULE_DEFINITION of the pch.

Differential Revision: http://reviews.llvm.org/D28415

llvm-svn: 291465
2017-01-09 19:20:18 +00:00
..
ASTCommon.cpp [c++1z] P0195R2: Support pack-expansion of using-declarations. 2016-12-20 21:35:28 +00:00
ASTCommon.h PR29097: add an update record when we instantiate the default member 2016-08-24 21:25:37 +00:00
ASTReader.cpp Simplify ASTReader ctor by using in-class initializers (NSDMIs to the rest of you) for many member variables 2017-01-05 18:45:43 +00:00
ASTReaderDecl.cpp Rename several methods on ASTRecordReader to follow LLVM style (lowerCamelCase). 2016-12-21 04:34:52 +00:00
ASTReaderInternals.h Remove move constructors that are identical to the generated default move ctor. 2016-10-21 18:55:07 +00:00
ASTReaderStmt.cpp [OpenMP] Sema and parsing for 'target teams distribute parallel for simd’ pragma 2017-01-03 05:23:48 +00:00
ASTWriter.cpp PCH: fix a regression that reports a module is defined in both pch and pcm. 2017-01-09 19:20:18 +00:00
ASTWriterDecl.cpp Fix for LLVM Bitcode API change (to use std::shared_ptr) 2017-01-04 22:36:43 +00:00
ASTWriterStmt.cpp [OpenMP] Sema and parsing for 'target teams distribute parallel for simd’ pragma 2017-01-03 05:23:48 +00:00
CMakeLists.txt Introduce module file extensions to piggy-back data onto module files. 2015-11-03 18:33:07 +00:00
GeneratePCH.cpp Use shared_ptr instead of IntrusiveRefCntPtr for ModuleFileExtension 2017-01-05 18:23:18 +00:00
GlobalModuleIndex.cpp Fix for LLVM Bitcode API change (to use std::shared_ptr) 2017-01-04 22:36:43 +00:00
Module.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
ModuleFileExtension.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
ModuleManager.cpp [VFS] Replace TimeValue usage with std::chrono 2016-11-09 10:52:22 +00:00
MultiOnDiskHashTable.h [NFC] Header cleanup 2016-07-18 19:02:11 +00:00