From a3c5d4a1eb1153d24477cf511a014191e8902eb1 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 23 Sep 2020 16:06:49 -0700 Subject: [PATCH] Adapt llvmorg-12-init-5498-g257b29715bb: add an argument to the ctor of clang::driver::Driver --- src/clang_tu.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/clang_tu.cc b/src/clang_tu.cc index 2a4ac132..9e026652 100644 --- a/src/clang_tu.cc +++ b/src/clang_tu.cc @@ -115,7 +115,11 @@ buildCompilerInvocation(const std::string &main, std::vector args, IntrusiveRefCntPtr diags( CompilerInstance::createDiagnostics(new DiagnosticOptions, new IgnoringDiagConsumer, true)); +#if LLVM_VERSION_MAJOR < 12 // llvmorg-12-init-5498-g257b29715bb driver::Driver d(args[0], llvm::sys::getDefaultTargetTriple(), *diags, vfs); +#else + driver::Driver d(args[0], llvm::sys::getDefaultTargetTriple(), *diags, "ccls", vfs); +#endif d.setCheckInputsExist(false); std::unique_ptr comp(d.BuildCompilation(args)); if (!comp)