diff options
author | Rui Ueyama <ruiu@google.com> | 2017-02-14 23:28:19 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-02-14 23:28:19 +0000 |
commit | 86e3ef92f389b51f49dc67f8c80c57312188ed45 (patch) | |
tree | ca0e6cb967d9b6c6d42192a3890c24215923a9a8 /llvm/lib/MC/WinCOFFObjectWriter.cpp | |
parent | cbb4e7c1fb8d39238e534ce9641633b4a00d742c (diff) | |
download | llvm-86e3ef92f389b51f49dc67f8c80c57312188ed45.zip llvm-86e3ef92f389b51f49dc67f8c80c57312188ed45.tar.gz llvm-86e3ef92f389b51f49dc67f8c80c57312188ed45.tar.bz2 |
Use endian::write32le instead of endian::write.
llvm-svn: 295120
Diffstat (limited to 'llvm/lib/MC/WinCOFFObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/WinCOFFObjectWriter.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp index d364951..7f62646 100644 --- a/llvm/lib/MC/WinCOFFObjectWriter.cpp +++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp @@ -48,6 +48,7 @@ #include <vector> using namespace llvm; +using llvm::support::endian::write32le; #define DEBUG_TYPE "WinCOFFObjectWriter" @@ -204,11 +205,6 @@ public: } // end anonymous namespace -static inline void write_uint32_le(void *Data, uint32_t Value) { - support::endian::write<uint32_t, support::little, support::unaligned>(Data, - Value); -} - //------------------------------------------------------------------------------ // Symbol class implementation @@ -216,8 +212,8 @@ static inline void write_uint32_le(void *Data, uint32_t Value) { // into the string table is stored in the last 4 bytes instead, leaving // the first 4 bytes as 0. void COFFSymbol::set_name_offset(uint32_t Offset) { - write_uint32_le(Data.Name + 0, 0); - write_uint32_le(Data.Name + 4, Offset); + write32le(Data.Name + 0, 0); + write32le(Data.Name + 4, Offset); } //------------------------------------------------------------------------------ |