[PATCH] D76594: [clang][AST] User relative offsets inside AST file

Dmitry Polukhin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 23 02:10:42 PDT 2020


DmitryPolukhin created this revision.
DmitryPolukhin added reviewers: rsmith, dexonsmith.
DmitryPolukhin added a project: clang.
Herald added subscribers: usaxena95, kadircet, ilya-biryukov.

Clang uses 32-bit integers for storing bit offsets from the beginning of
the file that results in 512M limit on AST file. This diff replaces
absolute offsets with relative offsets from the beginning of
corresponding data structure instead of whole file.

This diff breaks AST file format compatibility so VERSION_MAJOR bumped.

Test Plan:
Existing clang AST serialization tests
Tested on clangd with 700M preamble file


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76594

Files:
  clang/include/clang/Serialization/ASTBitCodes.h
  clang/include/clang/Serialization/ASTReader.h
  clang/include/clang/Serialization/ASTWriter.h
  clang/include/clang/Serialization/ModuleFile.h
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTWriter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76594.251964.patch
Type: text/x-patch
Size: 12584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200323/655c67f5/attachment.bin>


More information about the cfe-commits mailing list