[llvm-commits] CVS: llvm/tools/lli/ExecutionEngine.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Aug 24 14:56:02 PDT 2003
Changes in directory llvm/tools/lli:
ExecutionEngine.cpp updated: 1.22 -> 1.23
---
Log message:
Consult the target data, not the module, about how large the current pointer
size is. This ensures that if the module has no specified pointer size that
things will work correctly.
---
Diffs of the changes:
Index: llvm/tools/lli/ExecutionEngine.cpp
diff -u llvm/tools/lli/ExecutionEngine.cpp:1.22 llvm/tools/lli/ExecutionEngine.cpp:1.23
--- llvm/tools/lli/ExecutionEngine.cpp:1.22 Sun Aug 24 09:02:43 2003
+++ llvm/tools/lli/ExecutionEngine.cpp Sun Aug 24 14:55:26 2003
@@ -132,7 +132,7 @@
Ptr->Untyped[2] = (Val.UIntVal >> 16) & 255;
Ptr->Untyped[3] = (Val.UIntVal >> 24) & 255;
break;
- case Type::PointerTyID: if (CurMod.getPointerSize() != Module::Pointer64)
+ case Type::PointerTyID: if (getTargetData().getPointerSize() == 4)
goto Store4BytesLittleEndian;
case Type::DoubleTyID:
case Type::ULongTyID:
@@ -165,7 +165,7 @@
Ptr->Untyped[1] = (Val.UIntVal >> 16) & 255;
Ptr->Untyped[0] = (Val.UIntVal >> 24) & 255;
break;
- case Type::PointerTyID: if (CurMod.getPointerSize() != Module::Pointer64)
+ case Type::PointerTyID: if (getTargetData().getPointerSize() == 4)
goto Store4BytesBigEndian;
case Type::DoubleTyID:
case Type::ULongTyID:
@@ -204,7 +204,7 @@
((unsigned)Ptr->Untyped[2] << 16) |
((unsigned)Ptr->Untyped[3] << 24);
break;
- case Type::PointerTyID: if (CurMod.getPointerSize() != Module::Pointer64)
+ case Type::PointerTyID: if (getTargetData().getPointerSize() == 4)
goto Load4BytesLittleEndian;
case Type::DoubleTyID:
case Type::ULongTyID:
@@ -238,7 +238,7 @@
((unsigned)Ptr->Untyped[1] << 16) |
((unsigned)Ptr->Untyped[0] << 24);
break;
- case Type::PointerTyID: if (CurMod.getPointerSize() != Module::Pointer64)
+ case Type::PointerTyID: if (getTargetData().getPointerSize() == 4)
goto Load4BytesBigEndian;
case Type::DoubleTyID:
case Type::ULongTyID:
More information about the llvm-commits
mailing list