Make this actually work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17199 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alkis Evlogimenos 2004-10-24 03:02:16 +00:00
parent 7be2a12065
commit 6edde961e2

View File

@ -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);
}