This revision was automatically updated to reflect the committed changes. Closed by commit rL315212: Set PreprocessorOpts.GeneratePreamble=true in PrecompiledPreamble. (authored by ibiryukov).
Repository: rL LLVM https://reviews.llvm.org/D38617 Files: cfe/trunk/lib/Frontend/ASTUnit.cpp cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp Index: cfe/trunk/lib/Frontend/ASTUnit.cpp =================================================================== --- cfe/trunk/lib/Frontend/ASTUnit.cpp +++ cfe/trunk/lib/Frontend/ASTUnit.cpp @@ -1698,7 +1698,6 @@ PreprocessorOptions &PPOpts = CI->getPreprocessorOpts(); PPOpts.RemappedFilesKeepOriginalName = RemappedFilesKeepOriginalName; PPOpts.AllowPCHWithCompilerErrors = AllowPCHWithCompilerErrors; - PPOpts.GeneratePreamble = PrecompilePreambleAfterNParses != 0; PPOpts.SingleFileParseMode = SingleFileParse; // Override the resources path. Index: cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp =================================================================== --- cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp +++ cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp @@ -234,6 +234,8 @@ 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(
Index: cfe/trunk/lib/Frontend/ASTUnit.cpp =================================================================== --- cfe/trunk/lib/Frontend/ASTUnit.cpp +++ cfe/trunk/lib/Frontend/ASTUnit.cpp @@ -1698,7 +1698,6 @@ PreprocessorOptions &PPOpts = CI->getPreprocessorOpts(); PPOpts.RemappedFilesKeepOriginalName = RemappedFilesKeepOriginalName; PPOpts.AllowPCHWithCompilerErrors = AllowPCHWithCompilerErrors; - PPOpts.GeneratePreamble = PrecompilePreambleAfterNParses != 0; PPOpts.SingleFileParseMode = SingleFileParse; // Override the resources path. Index: cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp =================================================================== --- cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp +++ cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp @@ -234,6 +234,8 @@ 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(
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits