summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/tools/yaml2obj/yaml2elf.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/tools/yaml2obj/yaml2elf.cpp b/llvm/tools/yaml2obj/yaml2elf.cpp
index e3246bc2941..ba07c9c100c 100644
--- a/llvm/tools/yaml2obj/yaml2elf.cpp
+++ b/llvm/tools/yaml2obj/yaml2elf.cpp
@@ -40,8 +40,7 @@ class ContiguousBlobAccumulator {
Align = 1;
uint64_t CurrentOffset = InitialOffset + OS.tell();
uint64_t AlignedOffset = alignTo(CurrentOffset, Align);
- for (; CurrentOffset != AlignedOffset; ++CurrentOffset)
- OS.write('\0');
+ OS.write_zeros(AlignedOffset - CurrentOffset);
return AlignedOffset; // == CurrentOffset;
}
OpenPOWER on IntegriCloud