[all-commits] [llvm/llvm-project] 8af860: [NFC] [Serialization] Unify how LocalDeclID can be...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Wed Jun 19 00:18:50 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8af86025af2456c70c84aec309cca9a069124671
      https://github.com/llvm/llvm-project/commit/8af86025af2456c70c84aec309cca9a069124671
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2024-06-19 (Wed, 19 Jun 2024)

  Changed paths:
    M clang/include/clang/AST/ASTUnresolvedSet.h
    M clang/include/clang/AST/DeclID.h
    M clang/include/clang/Serialization/ASTBitCodes.h
    M clang/include/clang/Serialization/ASTReader.h
    M clang/include/clang/Serialization/ASTWriter.h
    M clang/lib/AST/DeclBase.cpp
    M clang/lib/AST/DeclTemplate.cpp
    M clang/lib/Frontend/ASTUnit.cpp
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTReaderDecl.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/lib/Serialization/ASTWriterDecl.cpp
    M clang/utils/TableGen/ClangAttrEmitter.cpp

  Log Message:
  -----------
  [NFC] [Serialization] Unify how LocalDeclID can be created

Now we can create a LocalDeclID directly with an integer without
verifying. It may be hard to refactor if we want to change the way we
serialize DeclIDs (See https://github.com/llvm/llvm-project/pull/95897).
Also it is hard for us to debug if someday someone construct a
LocalDeclID with an incorrect value.

So in this patch, I tried to unify the way we can construct a
LocalDeclID in ASTReader, where we will construct the LocalDeclID from
the serialized data. Also, now we can verify the constructed LocalDeclID
sooner in the new interface.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list