[llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Dec 13 11:49:05 PST 2004



Changes in directory llvm/lib/VMCore:

Constants.cpp updated: 1.117 -> 1.118
---
Log message:

Change this method to return ulong, not uint, for 64-bit targets.



---
Diffs of the changes:  (+4 -5)

Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.117 llvm/lib/VMCore/Constants.cpp:1.118
--- llvm/lib/VMCore/Constants.cpp:1.117	Tue Dec  7 01:38:08 2004
+++ llvm/lib/VMCore/Constants.cpp	Mon Dec 13 13:48:51 2004
@@ -1255,12 +1255,11 @@
 }
 
 Constant *ConstantExpr::getSizeOf(const Type *Ty) {
-  // sizeof is implemented as: (unsigned) gep (Ty*)null, 1
+  // sizeof is implemented as: (ulong) gep (Ty*)null, 1
   return getCast(
-    getGetElementPtr(
-      getNullValue(PointerType::get(Ty)),
-      std::vector<Constant*>(1, ConstantInt::get(Type::UIntTy, 1))),
-    Type::UIntTy);
+    getGetElementPtr(getNullValue(PointerType::get(Ty)),
+                 std::vector<Constant*>(1, ConstantInt::get(Type::UIntTy, 1))),
+    Type::ULongTy);
 }
 
 Constant *ConstantExpr::getTy(const Type *ReqTy, unsigned Opcode,






More information about the llvm-commits mailing list