[PATCH] D104745: [llvm-cov] Enforce alignment of function records

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 22 13:56:18 PDT 2021


serge-sans-paille created this revision.
serge-sans-paille added reviewers: MaskRay, phosek.
Herald added a subscriber: hiraditya.
serge-sans-paille requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Function Records are required to be aligned on 8 bits. This is enforced for each
records except the first, when one relies on the default alignment within and
std::string. There's no such guarantee, and indeed on 32 bits for some
implementation of std::string this is not enforced.

Provide a portable implementation based on llvm's MemoryBuffer.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104745

Files:
  llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h
  llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104745.353776.patch
Type: text/x-patch
Size: 6206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210622/c06b766e/attachment.bin>


More information about the llvm-commits mailing list