summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-01-22 19:58:18 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-01-22 19:58:18 +0000
commitc0b103b133fb2bcbc2c0095c81127e640c7b8736 (patch)
treec11aeb7b7543292349397afdd55ce0c240b369a7
parentac2b0a168d1ba0403a51bc606a8a61fda5dc4d43 (diff)
downloadbcm5719-llvm-c0b103b133fb2bcbc2c0095c81127e640c7b8736.tar.gz
bcm5719-llvm-c0b103b133fb2bcbc2c0095c81127e640c7b8736.zip
Typo fix and simplification.
Thanks to Justin Bogner for the suggestion. llvm-svn: 258540
-rw-r--r--llvm/include/llvm/Support/EndianStream.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/include/llvm/Support/EndianStream.h b/llvm/include/llvm/Support/EndianStream.h
index 81908e9e5f1..43ecd4a5c97 100644
--- a/llvm/include/llvm/Support/EndianStream.h
+++ b/llvm/include/llvm/Support/EndianStream.h
@@ -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);
OpenPOWER on IntegriCloud