ClangPchManager: Improve settings for PCH creation

Change-Id: I398721f5b2659a958252812057e6b2510a351ab6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Marco Bubke
2019-05-06 15:59:16 +02:00
parent e904fc202c
commit 871fb84e93

View File

@@ -47,6 +47,8 @@ public:
compilerInstance.getPreprocessorOpts().DisablePCHValidation = true;
compilerInstance.getPreprocessorOpts().AllowPCHWithCompilerErrors = true;
compilerInstance.getDiagnosticOpts().ErrorLimit = 0;
compilerInstance.getFrontendOpts().SkipFunctionBodies = true;
compilerInstance.getFrontendOpts().IncludeTimestamps = true;
std::unique_ptr<llvm::MemoryBuffer> Input = llvm::MemoryBuffer::getMemBuffer(m_fileContent);
compilerInstance.getPreprocessorOpts().addRemappedFile(m_filePath, Input.release());