update to clang 9 (#799)

This commit is contained in:
Malte Langkabel
2019-12-16 15:53:58 +01:00
committed by Eberhard Graether
parent 13ed6ee903
commit 23236541f8
3 changed files with 8 additions and 4 deletions
+1
View File
@@ -301,6 +301,7 @@ if (BUILD_CXX_LANGUAGE_PACKAGE)
msp430asmparser msp430codegen
nvptxcodegen
powerpcasmparser powerpccodegen
riscvasmparser riscvcodegen
sparcasmparser sparccodegen
systemzasmparser systemzcodegen
webassemblyasmparser webassemblycodegen
@@ -61,7 +61,7 @@ ClangInvocationInfo ClangInvocationInfo::getClangInvocationString(
new clang::FileManager(clang::FileSystemOptions()));
const std::unique_ptr<clang::driver::Driver> Driver(
newDriver(&Diagnostics, BinaryName, Files->getVirtualFileSystem()));
newDriver(&Diagnostics, BinaryName, &Files->getVirtualFileSystem()));
// Since the input might only be virtual, don't check whether it exists.
Driver->setCheckInputsExist(false);
const std::unique_ptr<clang::driver::Compilation> Compilation(
@@ -3,6 +3,7 @@
#include <clang/Frontend/CompilerInstance.h>
#include <clang/Frontend/MultiplexConsumer.h>
#include <clang/Serialization/ASTWriter.h>
#include <clang/Lex/PreprocessorOptions.h>
#include "PreprocessorCallbacks.h"
@@ -36,14 +37,16 @@ std::unique_ptr<clang::ASTConsumer> GeneratePCHAction::CreateASTConsumer(
const auto& FrontendOpts = CI.getFrontendOpts();
auto Buffer = std::make_shared<clang::PCHBuffer>();
std::vector<std::unique_ptr<clang::ASTConsumer>> Consumers;
Consumers.push_back(llvm::make_unique<clang::PCHGenerator>(
Consumers.push_back(std::make_unique<clang::PCHGenerator>(
CI.getPreprocessor(),
CI.getModuleCache(),
OutputFile,
Sysroot,
Buffer,
FrontendOpts.ModuleFileExtensions,
true,
FrontendOpts.IncludeTimestamps));
true, // always allow errors in the PCH
FrontendOpts.IncludeTimestamps,
+CI.getLangOpts().CacheGeneratedPCH));
Consumers.push_back(CI.getPCHContainerWriter().CreatePCHContainerGenerator(
CI, InFile, OutputFile, std::move(OS), Buffer));