Skip to content

Commit a3c5d4a

Browse files
committed
Adapt llvmorg-12-init-5498-g257b29715bb: add an argument to the ctor of clang::driver::Driver
1 parent 20a9f7b commit a3c5d4a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/clang_tu.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ buildCompilerInvocation(const std::string &main, std::vector<const char *> args,
115115
IntrusiveRefCntPtr<DiagnosticsEngine> diags(
116116
CompilerInstance::createDiagnostics(new DiagnosticOptions,
117117
new IgnoringDiagConsumer, true));
118+
#if LLVM_VERSION_MAJOR < 12 // llvmorg-12-init-5498-g257b29715bb
118119
driver::Driver d(args[0], llvm::sys::getDefaultTargetTriple(), *diags, vfs);
120+
#else
121+
driver::Driver d(args[0], llvm::sys::getDefaultTargetTriple(), *diags, "ccls", vfs);
122+
#endif
119123
d.setCheckInputsExist(false);
120124
std::unique_ptr<driver::Compilation> comp(d.BuildCompilation(args));
121125
if (!comp)

0 commit comments

Comments
 (0)