OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
984cea8
)
[yaml2obj] - Replace a loop with write_zeros(). NFCI.
author
George Rimar
<grimar@accesssoftek.com>
Mon, 29 Apr 2019 12:05:53 +0000
(12:05 +0000)
committer
George Rimar
<grimar@accesssoftek.com>
Mon, 29 Apr 2019 12:05:53 +0000
(12:05 +0000)
This looks better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359444
91177308
-0d34-0410-b5e6-
96231b3b80d8
tools/yaml2obj/yaml2elf.cpp
patch
|
blob
|
history
diff --git
a/tools/yaml2obj/yaml2elf.cpp
b/tools/yaml2obj/yaml2elf.cpp
index
e3246bc
..
ba07c9c
100644
(file)
--- a/
tools/yaml2obj/yaml2elf.cpp
+++ b/
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;
}