[all-commits] [llvm/llvm-project] ed3391: [clangd] Always default to raw pch format

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Fri May 14 07:40:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ed339111bff690c6ba87d5e25c50bcad6793a309
      https://github.com/llvm/llvm-project/commit/ed339111bff690c6ba87d5e25c50bcad6793a309
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2021-05-14 (Fri, 14 May 2021)

  Changed paths:
    M clang-tools-extra/clangd/Compiler.cpp
    M clang-tools-extra/clangd/unittests/ModulesTests.cpp

  Log Message:
  -----------
  [clangd] Always default to raw pch format

Clang would emit a fatal error when it encounters an unregistered PCH
format. This change ensures clangd will always use raw format no matter what
user specifies.

As side effects:

- serializing an AST in an unknown format might throw off build
systems. I suppose this would only be an issue when build system and clangd are
racing for same PCM modules, hopefully this should be rare and both clangd or
the build system should recover on the next run.

- whenever clang reads a serialized AST it seems to be checking for file
signature and emitting non-fatal errors. so this should be fine again.

The only other valid module format in clang is `obj` but it is part of codegen,
i don't think it is worth the dependency. Hence chosing to not register it, at
least yet.

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




More information about the All-commits mailing list