forked from OSchip/llvm-project
Typo fix and simplification.
Thanks to Justin Bogner for the suggestion. llvm-svn: 258540
This commit is contained in:
parent
ac2b0a168d
commit
c0b103b133
|
@ -28,10 +28,8 @@ template <endianness endian> struct Writer {
|
|||
raw_ostream &OS;
|
||||
Writer(raw_ostream &OS) : OS(OS) {}
|
||||
template <typename value_type> void write(ArrayRef<value_type> Vals) {
|
||||
for (value_type V : Vals) {
|
||||
value_type Swaped = byte_swap<value_type, endian>(V);
|
||||
OS.write((const char *)&Swaped, sizeof(value_type));
|
||||
}
|
||||
for (value_type V : Vals)
|
||||
write(V);
|
||||
}
|
||||
template <typename value_type> void write(value_type Val) {
|
||||
Val = byte_swap<value_type, endian>(Val);
|
||||
|
|
Loading…
Reference in New Issue