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

Alkis Evlogimenos alkis at cs.uiuc.edu
Sat Oct 23 20:02:27 PDT 2004



Changes in directory llvm/lib/VMCore:

Constants.cpp updated: 1.109 -> 1.110
---
Log message:

Make this actually work.


---
Diffs of the changes:  (+2 -2)

Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.109 llvm/lib/VMCore/Constants.cpp:1.110
--- llvm/lib/VMCore/Constants.cpp:1.109	Sat Oct 23 20:41:10 2004
+++ llvm/lib/VMCore/Constants.cpp	Sat Oct 23 22:02:16 2004
@@ -1245,10 +1245,10 @@
 }
 
 Constant *ConstantExpr::getSizeOf(const Type *Ty) {
-  // sizeof is implemented as: (unsigned) gep (Ty)null, 1
+  // sizeof is implemented as: (unsigned) gep (Ty*)null, 1
   return getCast(
     getGetElementPtr(
-      getNullValue(Ty),
+      getNullValue(PointerType::get(Ty)),
       std::vector<Constant*>(1, ConstantInt::get(Type::UByteTy, 1))),
     Type::UIntTy);
 }






More information about the llvm-commits mailing list