aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-12-12 23:03:45 +0000
committerDuncan Sands <baldrick@free.fr>2007-12-12 23:03:45 +0000
commit2e6d342eadd76d0ba7dbc62084b5475befb49636 (patch)
treef4deb78e05abb63d0a95fc6c7eb5f0bcbf58d20b /lib/ExecutionEngine
parent52f9dc5d0784eda9a9a26acb50bd8e80a7f2b8ba (diff)
downloadexternal_llvm-2e6d342eadd76d0ba7dbc62084b5475befb49636.zip
external_llvm-2e6d342eadd76d0ba7dbc62084b5475befb49636.tar.gz
external_llvm-2e6d342eadd76d0ba7dbc62084b5475befb49636.tar.bz2
Remove host endianness info from TargetData and
put it in a new header System/Host.h instead. Instead of getting the endianness from configure, calculate it directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44959 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index 2c7a7dd..521e423 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -23,6 +23,7 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/MutexGuard.h"
#include "llvm/System/DynamicLibrary.h"
+#include "llvm/System/Host.h"
#include "llvm/Target/TargetData.h"
#include <math.h>
using namespace llvm;
@@ -637,7 +638,7 @@ void ExecutionEngine::StoreValueToMemory(const GenericValue &Val, GenericValue *
uint8_t *Src = (uint8_t *)Val.IntVal.getRawData();
uint8_t *Dst = (uint8_t *)Ptr;
- if (getTargetData()->hostIsLittleEndian())
+ if (sys::littleEndianHost())
// Little-endian host - the source is ordered from LSB to MSB.
// Order the destination from LSB to MSB: Do a straight copy.
memcpy(Dst, Src, StoreBytes);
@@ -698,7 +699,7 @@ void ExecutionEngine::LoadValueFromMemory(GenericValue &Result,
uint8_t *Src = (uint8_t *)Ptr;
uint8_t *Dst = (uint8_t *)Result.IntVal.getRawData();
- if (getTargetData()->hostIsLittleEndian())
+ if (sys::littleEndianHost())
// Little-endian host - the destination must be ordered from LSB to MSB.
// The source is ordered from LSB to MSB: Do a straight copy.
memcpy(Dst, Src, LoadBytes);