aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-10-24 03:02:16 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-10-24 03:02:16 +0000
commit6edde961e274d738f5cf0ca956eec3384860e810 (patch)
treef1c7624ce77696bec6b4d673f2b875b23afd6af0
parent7be2a120659cc61e554b04815ed3f1d4f234ecaf (diff)
downloadexternal_llvm-6edde961e274d738f5cf0ca956eec3384860e810.zip
external_llvm-6edde961e274d738f5cf0ca956eec3384860e810.tar.gz
external_llvm-6edde961e274d738f5cf0ca956eec3384860e810.tar.bz2
Make this actually work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17199 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Constants.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp
index 3d2e658..bf6332b 100644
--- a/lib/VMCore/Constants.cpp
+++ b/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);
}