From e351c3a4387b904b05bf750cd06cc6c8a3c61d6c Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Fri, 16 Feb 2018 20:38:15 +0000 Subject: [PATCH] Use write32le instead of write32. llvm-svn: 325384 --- lld/wasm/InputChunks.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lld/wasm/InputChunks.cpp b/lld/wasm/InputChunks.cpp index fb862dd6b25e..1d5f7336b283 100644 --- a/lld/wasm/InputChunks.cpp +++ b/lld/wasm/InputChunks.cpp @@ -18,6 +18,7 @@ using namespace llvm; using namespace llvm::wasm; +using namespace llvm::support::endian; using namespace lld; using namespace lld::wasm; @@ -66,7 +67,7 @@ static void applyRelocation(uint8_t *Buf, const OutputRelocation &Reloc) { break; case R_WEBASSEMBLY_TABLE_INDEX_I32: case R_WEBASSEMBLY_MEMORY_ADDR_I32: - support::endian::write32(Buf, Reloc.Value); + write32le(Buf, Reloc.Value); break; default: llvm_unreachable("unknown relocation type");