OSDN Git Service

Bitcode: add some convenience helpers for streaming bitcode
authorSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 29 Sep 2020 21:16:02 +0000 (21:16 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 8 Dec 2020 21:15:41 +0000 (21:15 +0000)
commit939c8f676c871682dba8bab25ee4c0c08faf98e1
tree15da84d925f9b7d3297827b6a72be680a6a1b2b5
parent843f2dbf003f2a51d0d4ab8cf40647c99ded2e93
Bitcode: add some convenience helpers for streaming bitcode

This adds a set of metaprogramming helpers to help define records and
serialize them out.  This is motivated by API Notes which use the
bitcode format to serialize out a binary representation of the data.
These helpers are generically useful though and could help simplify some
of the existing bitcode consumers as well.

This is extracted from the code contributed by Apple at
https://github.com/llvm/llvm-project-staging/tree/staging/swift/apinotes.

Differential Revision: https://reviews.llvm.org/D88582
llvm/include/llvm/Bitcode/BitcodeConvenience.h [new file with mode: 0644]