Skip to content

Commit

Permalink
Typo fix and simplification.
Browse files Browse the repository at this point in the history
Thanks to Justin Bogner for the suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258540 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
espindola committed Jan 22, 2016
1 parent 8c37fa8 commit aee336a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions include/llvm/Support/EndianStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit aee336a

Please sign in to comment.