This will eventually replace MCObjectWriter::WriteZeros.
Part of PR37466.
Differential Revision: https://reviews.llvm.org/D47033
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332675
91177308-0d34-0410-b5e6-
96231b3b80d8
// and coverage mappings is a multiple of 8.
if (size_t Rem = OS.str().size() % 8) {
CoverageMappingSize += 8 - Rem;
- for (size_t I = 0, S = 8 - Rem; I < S; ++I)
- OS << '\0';
+ OS.write_zeros(8 - Rem);
}
auto *FilenamesAndMappingsVal =
llvm::ConstantDataArray::getString(Ctx, OS.str(), false);