[all-commits] [llvm/llvm-project] de4ba7: [clangd] Move DirBasedCDB broadcasting onto its ow...

Sam McCall via All-commits all-commits at lists.llvm.org
Wed Jan 20 02:27:20 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: de4ba7073bd7e200aca704e6a26403e07bc246a5
      https://github.com/llvm/llvm-project/commit/de4ba7073bd7e200aca704e6a26403e07bc246a5
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
    M clang-tools-extra/clangd/GlobalCompilationDatabase.h
    M clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp

  Log Message:
  -----------
  [clangd] Move DirBasedCDB broadcasting onto its own thread.

This is on the critical path (it blocks getting the compile command for
the first file).

It's not trivially fast: it involves processing all filenames in the CDB
and doing some IO to look for shadowing CDBs.

And we may make this slower soon - making CDB configurable implies evaluating
the config for each listed to see which ones really are owned by the
broadcasted CDB.

Differential Revision: https://reviews.llvm.org/D94606




More information about the All-commits mailing list