diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index 19d7ce375ec..5be3aa87e0a 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -21,7 +21,6 @@ #include "llvm/ModuleProvider.h" #include "llvm/ExecutionEngine/GenericValue.h" #include "llvm/ADT/Statistic.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MutexGuard.h" @@ -855,17 +854,6 @@ void ExecutionEngine::LoadValueFromMemory(GenericValue &Result, const Type *Ty) { const unsigned LoadBytes = getTargetData()->getTypeStoreSize(Ty); - if (sys::isLittleEndianHost() != getTargetData()->isLittleEndian()) { - // Host and target are different endian - reverse copy the stored - // bytes into a buffer, and load from that. - uint8_t *Src = (uint8_t*)Ptr; - - SmallVector Buf; - Buf.resize(LoadBytes+1); - std::reverse_copy(Src, Src + LoadBytes, Buf.data()); - Ptr = (GenericValue*)Buf.data(); - } - switch (Ty->getTypeID()) { case Type::IntegerTyID: // An APInt with all words initially zero.