summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli/lli.cpp
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
commit479854091aee9ba626fca8dc1c6e86e49e5c808b (patch)
tree9c8a38511be38da94014591dc522673f8c6f5cce /llvm/tools/lli/lli.cpp
parentb14924009691f05ffcdd9fc262ffa6699ec4475a (diff)
downloadbcm5719-llvm-479854091aee9ba626fca8dc1c6e86e49e5c808b.tar.gz
bcm5719-llvm-479854091aee9ba626fca8dc1c6e86e49e5c808b.zip
Add preliminary support for "any" pointersize/endianness. This will need
to change soon though. llvm-svn: 8123
Diffstat (limited to 'llvm/tools/lli/lli.cpp')
-rw-r--r--llvm/tools/lli/lli.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp
index 7a0925deece..6c537ec037d 100644
--- a/llvm/tools/lli/lli.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud