This is an archive of the discontinued LLVM Phabricator instance.

[clangd] GlobalCompilationDatabase interface changes
ClosedPublic

Authored by sammccall on Dec 1 2017, 8:29 AM.

Details

Summary
  • GlobalCompilationDatabase now returns a single command (that's all we use)
  • fallback flags are now part of the GlobalCompilationDatabase. There's a default implementation that they can optionally customize.
  • this allows us to avoid invoking the fallback logic on two separate codepaths
  • race on extra flags fixed by locking the mutex
  • made GCD const-correct (DBGCD does have mutating methods)

Diff Detail

Repository
rL LLVM

Event Timeline

sammccall created this revision.Dec 1 2017, 8:29 AM
hokein accepted this revision.Dec 4 2017, 1:11 AM

LGTM.

clangd/ClangdUnitStore.cpp
67 ↗(On Diff #125151)

nit: you can use ResourceDir.str().

This revision is now accepted and ready to land.Dec 4 2017, 1:11 AM
sammccall marked an inline comment as done.Dec 4 2017, 2:09 AM
This revision was automatically updated to reflect the committed changes.