Change the PointerType api for creating pointer types. The old functionality of Point...
[oota-llvm.git] / lib / VMCore / Constants.cpp
index 964d8880e87b625d3cc67a2a30a0c5ac9e375033..83070c00e14af67d6cb412850da0a6921d5e045c 100644 (file)
@@ -1710,7 +1710,7 @@ Constant *ConstantExpr::getSizeOf(const Type *Ty) {
   // sizeof is implemented as: (i64) gep (Ty*)null, 1
   Constant *GEPIdx = ConstantInt::get(Type::Int32Ty, 1);
   Constant *GEP =
-    getGetElementPtr(getNullValue(PointerType::get(Ty)), &GEPIdx, 1);
+    getGetElementPtr(getNullValue(PointerType::getUnqual(Ty)), &GEPIdx, 1);
   return getCast(Instruction::PtrToInt, GEP, Type::Int64Ty);
 }