diff options
author | Chris Lattner <sabre@nondot.org> | 2004-12-13 19:48:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-12-13 19:48:51 +0000 |
commit | fcdd82e4a952aeedfa212f3b355bb1bb30887fb6 (patch) | |
tree | 7761423713f646c8c87175f703dc57118ba105ac /lib/VMCore/Constants.cpp | |
parent | 0adacc5670182f135c9baa05f74778f63fa7406b (diff) | |
download | external_llvm-fcdd82e4a952aeedfa212f3b355bb1bb30887fb6.zip external_llvm-fcdd82e4a952aeedfa212f3b355bb1bb30887fb6.tar.gz external_llvm-fcdd82e4a952aeedfa212f3b355bb1bb30887fb6.tar.bz2 |
Change this method to return ulong, not uint, for 64-bit targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18906 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Constants.cpp')
-rw-r--r-- | lib/VMCore/Constants.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 97e4fa5..f09e3b9 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -1255,12 +1255,11 @@ 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: (ulong) gep (Ty*)null, 1 return getCast( - getGetElementPtr( - getNullValue(PointerType::get(Ty)), - std::vector<Constant*>(1, ConstantInt::get(Type::UIntTy, 1))), - Type::UIntTy); + getGetElementPtr(getNullValue(PointerType::get(Ty)), + std::vector<Constant*>(1, ConstantInt::get(Type::UIntTy, 1))), + Type::ULongTy); } Constant *ConstantExpr::getTy(const Type *ReqTy, unsigned Opcode, |