aboutsummaryrefslogtreecommitdiff
path: root/tools/lli/lli.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-04-22 18:10:32 +0000
committerChris Lattner <sabre@nondot.org>2003-04-22 18:10:32 +0000
commite0b235cd97ffcc2480aaf5f617c47cbc4bbfba24 (patch)
tree4753cd9afe9759c968bc7aeb86fda56e092fb693 /tools/lli/lli.cpp
parentbf4ff33e22ae48df8793db370efb85024443fc43 (diff)
Build the appropriate target machine for the input pointer size and endianness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5838 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli/lli.cpp')
-rw-r--r--tools/lli/lli.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index 73052c0709..6906465d71 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -75,10 +75,8 @@ int main(int argc, char** argv) {
}
#endif
- // FIXME: This should look at the PointerSize and endianness of the bytecode
- // file to determine the endianness and pointer size of target machine to use.
- unsigned Config = TM::PtrSize64 | TM::BigEndian;
-
+ unsigned Config = (M->isLittleEndian() ? TM::LittleEndian : TM::BigEndian) |
+ (M->has32BitPointers() ? TM::PtrSize32 : TM::PtrSize64);
ExecutionEngine *EE = 0;
// If there is nothing that is forcing us to use the interpreter, make a JIT.