[llvm-commits] CVS: llvm/tools/lli/lli.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Apr 22 13:11:00 PDT 2003


Changes in directory llvm/tools/lli:

lli.cpp updated: 1.15 -> 1.16

---
Log message:

Build the appropriate target machine for the input pointer size and endianness


---
Diffs of the changes:

Index: llvm/tools/lli/lli.cpp
diff -u llvm/tools/lli/lli.cpp:1.15 llvm/tools/lli/lli.cpp:1.16
--- llvm/tools/lli/lli.cpp:1.15	Mon Dec 23 18:39:16 2002
+++ llvm/tools/lli/lli.cpp	Tue Apr 22 13:10:32 2003
@@ -75,10 +75,8 @@
   }
 #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.





More information about the llvm-commits mailing list