[PATCH] D124909: Fix issues with using clangd with C++ modules

Kugan Vivekanandarajah via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 4 08:48:46 PDT 2022


kuganv added a comment.

Thanks a lot for the detailed. comment. Yes, you are right in that we are using build system (buck) to build the modules and provide as part of the CDB. This is fairly cheap when we hit the buck cache that is also shared by others.

You are right in that the PCM format is not stable and clangd can only consume modules if the build system uses the exact same version of the clang. We do have checks in ASTReader that validates this. I don’t see anyway we can relax this unless we formalise AST and guarantee full compatibility. For our use, we expect to use the exact same version of clang as clangd for building the PCM.

As for different modes, unless I am missing something, we should only care about modes that we explicitly set in clangd. We should expect the modules in CDB should match the options provided by CDB. We could  relax some these if they difference does not matter.

My main goat of this patch is to enable middles so that we can test is more widely.  I understand that we would find more issues that may need fixing,


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124909/new/

https://reviews.llvm.org/D124909



More information about the cfe-commits mailing list