Skip to content

Commit

Permalink
Adapt llvmorg-12-init-5498-g257b29715bb: add an argument to the ctor …
Browse files Browse the repository at this point in the history
…of clang::driver::Driver
  • Loading branch information
MaskRay committed Sep 23, 2020
1 parent 20a9f7b commit a3c5d4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/clang_tu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ buildCompilerInvocation(const std::string &main, std::vector<const char *> args,
IntrusiveRefCntPtr<DiagnosticsEngine> 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<driver::Compilation> comp(d.BuildCompilation(args));
if (!comp)
Expand Down

0 comments on commit a3c5d4a

Please sign in to comment.