diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-26 08:11:39 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-26 08:11:39 +0000 |
commit | 26f238589f9bb372d24b6fb2bc32edbf046fd9ee (patch) | |
tree | 87532562132bac63689288511136efa1f8fc1132 /lib/ExecutionEngine/Interpreter | |
parent | aacc35a7943da43c233378b29f83b3382ff58904 (diff) | |
download | external_llvm-26f238589f9bb372d24b6fb2bc32edbf046fd9ee.zip external_llvm-26f238589f9bb372d24b6fb2bc32edbf046fd9ee.tar.gz external_llvm-26f238589f9bb372d24b6fb2bc32edbf046fd9ee.tar.bz2 |
For PR761:
The Module::setEndianness and Module::setPointerSize methods have been
removed. Instead you can get/set the DataLayout. Adjust thise accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33530 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/Interpreter.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.cpp b/lib/ExecutionEngine/Interpreter/Interpreter.cpp index 4728c95..d39b5e1 100644 --- a/lib/ExecutionEngine/Interpreter/Interpreter.cpp +++ b/lib/ExecutionEngine/Interpreter/Interpreter.cpp @@ -39,18 +39,17 @@ ExecutionEngine *Interpreter::create(ModuleProvider *MP) { return 0; // error materializing the module. } - if (M->getEndianness() == Module::AnyEndianness) { - int Test = 0; - *(char*)&Test = 1; // Return true if the host is little endian - bool isLittleEndian = (Test == 1); - M->setEndianness(isLittleEndian ? Module::LittleEndian : Module::BigEndian); - } - - if (M->getPointerSize() == Module::AnyPointerSize) { - // Follow host. - bool Ptr64 = sizeof(void*) == 8; - M->setPointerSize(Ptr64 ? Module::Pointer64 : Module::Pointer32); - } + // FIXME: This should probably compute the entire data layout + std::string DataLayout; + int Test = 0; + *(char*)&Test = 1; // Return true if the host is little endian + bool isLittleEndian = (Test == 1); + DataLayout.append(isLittleEndian ? "e" : "E"); + + bool Ptr64 = sizeof(void*) == 8; + DataLayout.append(Ptr64 ? "-p:64:64" : "-p:32:32"); + + M->setDataLayout(DataLayout); return new Interpreter(M); } |