aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lli
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-24 14:02:47 +0000
committerChris Lattner <sabre@nondot.org>2003-08-24 14:02:47 +0000
commit1543e40cea50d244979f0667f453cf3466a6106c (patch)
tree566b386f7ebd662bfa437bd824c43387428584e8 /tools/lli
parentbb43350e32c949ff9465eb898a2ed5ad9d1f3f9f (diff)
downloadexternal_llvm-1543e40cea50d244979f0667f453cf3466a6106c.zip
external_llvm-1543e40cea50d244979f0667f453cf3466a6106c.tar.gz
external_llvm-1543e40cea50d244979f0667f453cf3466a6106c.tar.bz2
Add preliminary support for "any" pointersize/endianness. This will need
to change soon though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli')
-rw-r--r--tools/lli/lli.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index 7a0925d..6c537ec 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -75,8 +75,10 @@ int main(int argc, char** argv, const char ** envp) {
}
#endif
- unsigned Config = (M->isLittleEndian() ? TM::LittleEndian : TM::BigEndian) |
- (M->has32BitPointers() ? TM::PtrSize32 : TM::PtrSize64);
+ // FIXME: in adddition to being gross, this is also wrong: This should use the
+ // pointersize/endianness of the host if the pointer size is not specified!!
+ unsigned Config = (M->getEndianness() != Module::BigEndian ? TM::LittleEndian : TM::BigEndian) |
+ (M->getPointerSize() != Module::Pointer64 ? TM::PtrSize32 : TM::PtrSize64);
ExecutionEngine *EE = 0;
// If there is nothing that is forcing us to use the interpreter, make a JIT.