From be368ba871f5ab07d49788110cb8f491febf74f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 17 Feb 2015 16:19:41 +0100 Subject: [PATCH] Get endianess from LLVM --- libevmjit/Endianness.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libevmjit/Endianness.cpp b/libevmjit/Endianness.cpp index 38f71560c..d36f4b7fa 100644 --- a/libevmjit/Endianness.cpp +++ b/libevmjit/Endianness.cpp @@ -2,6 +2,7 @@ #include "preprocessor/llvm_includes_start.h" #include +#include #include "preprocessor/llvm_includes_end.h" #include "Type.h" @@ -15,13 +16,7 @@ namespace jit llvm::Value* Endianness::bswapIfLE(llvm::IRBuilder<>& _builder, llvm::Value* _word) { - union tester - { - unsigned int x; - unsigned char isLE; - }; - - if (tester{1}.isLE) + if (llvm::sys::IsLittleEndianHost) { // FIXME: Disabled because of problems with BYTE //if (auto constant = llvm::dyn_cast(_word))