[all-commits] [llvm/llvm-project] bb8c7e: Add AST_SIGNATURE record to unhashed control block...

Daniel Grumberg via All-commits all-commits at lists.llvm.org
Thu Jun 11 06:09:39 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bb8c7e756c51bb3dc05b30671fa4c64f48e41c39
      https://github.com/llvm/llvm-project/commit/bb8c7e756c51bb3dc05b30671fa4c64f48e41c39
  Author: Daniel Grumberg <dany.grumberg at gmail.com>
  Date:   2020-06-11 (Thu, 11 Jun 2020)

  Changed paths:
    M clang/include/clang/Serialization/ASTBitCodes.h
    M clang/include/clang/Serialization/ASTReader.h
    M clang/include/clang/Serialization/ASTWriter.h
    M clang/include/clang/Serialization/ModuleFile.h
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTReaderDecl.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/lib/Serialization/ASTWriterDecl.cpp
    A clang/test/Modules/ASTSignature.c
    A clang/test/Modules/Inputs/ASTHash/module.modulemap
    A clang/test/Modules/Inputs/ASTHash/my_header_1.h
    A clang/test/Modules/Inputs/ASTHash/my_header_2.h

  Log Message:
  -----------
  Add AST_SIGNATURE record to unhashed control block of PCM files

Summary:
This record is constructed by hashing the bytes of the AST block in a similiar
fashion to the SIGNATURE record. This new signature only means anything if the
AST block is fully relocatable, i.e. it does not embed absolute offsets within
the PCM file. This change ensure this does not happen by replacing these offsets
with offsets relative to the nearest relevant subblock of the AST block.

Reviewers: Bigcheese, dexonsmith

Subscribers: dexonsmith, cfe-commits

Tags: #clang

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




More information about the All-commits mailing list