Skip to content

Commit df48a6d

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

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
@@ -116,7 +116,11 @@ buildCompilerInvocation(const std::string &main, std::vector<const char *> args,
116116
IntrusiveRefCntPtr<DiagnosticsEngine> diags(
117117
CompilerInstance::createDiagnostics(new DiagnosticOptions,
118118
new IgnoringDiagConsumer, true));
119+
#if LLVM_VERSION_MAJOR < 12 // llvmorg-12-init-5498-g257b29715bb
119120
driver::Driver d(args[0], llvm::sys::getDefaultTargetTriple(), *diags, vfs);
121+
#else
122+
driver::Driver d(args[0], llvm::sys::getDefaultTargetTriple(), *diags, "ccls", vfs);
123+
#endif
120124
d.setCheckInputsExist(false);
121125
std::unique_ptr<driver::Compilation> comp(d.BuildCompilation(args));
122126
if (!comp)

0 commit comments

Comments
 (0)