diff options
| -rw-r--r-- | llvm/lib/VMCore/Constants.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp index 3d2e658e634..bf6332b44c7 100644 --- a/llvm/lib/VMCore/Constants.cpp +++ b/llvm/lib/VMCore/Constants.cpp @@ -1245,10 +1245,10 @@ Constant *ConstantExpr::getZeroExtend(Constant *C, const Type *Ty) { } 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); } |

