forked from OSchip/llvm-project
Set PreprocessorOpts.GeneratePreamble=true in PrecompiledPreamble.
Summary: It was previsouly set only in ASTUnit, but it should be set for all client of PrecompiledPreamble. Reviewers: erikjv, bkramer, klimek Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D38617 llvm-svn: 315212
This commit is contained in:
parent
08e6ccbcf3
commit
eb1ec876b3
|
@ -1698,7 +1698,6 @@ ASTUnit *ASTUnit::LoadFromCommandLine(
|
|||
PreprocessorOptions &PPOpts = CI->getPreprocessorOpts();
|
||||
PPOpts.RemappedFilesKeepOriginalName = RemappedFilesKeepOriginalName;
|
||||
PPOpts.AllowPCHWithCompilerErrors = AllowPCHWithCompilerErrors;
|
||||
PPOpts.GeneratePreamble = PrecompilePreambleAfterNParses != 0;
|
||||
PPOpts.SingleFileParseMode = SingleFileParse;
|
||||
|
||||
// Override the resources path.
|
||||
|
|
|
@ -234,6 +234,8 @@ llvm::ErrorOr<PrecompiledPreamble> PrecompiledPreamble::Build(
|
|||
FrontendOpts.OutputFile = PreamblePCHFile->getFilePath();
|
||||
PreprocessorOpts.PrecompiledPreambleBytes.first = 0;
|
||||
PreprocessorOpts.PrecompiledPreambleBytes.second = false;
|
||||
// Inform preprocessor to record conditional stack when building the preamble.
|
||||
PreprocessorOpts.GeneratePreamble = true;
|
||||
|
||||
// Create the compiler instance to use for building the precompiled preamble.
|
||||
std::unique_ptr<CompilerInstance> Clang(
|
||||
|
|
Loading…
Reference in New Issue