summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-01-28 02:43:22 +0000
committerDan Gohman <gohman@apple.com>2010-01-28 02:43:22 +0000
commita9be73929f6876c5a21750e361b279e9d84ee19a (patch)
tree61d3b903241ae052f590d11e4128cc64a8bb3a5e /llvm/lib
parentcf9138307dba746470ece630e3eeb340af5f3432 (diff)
downloadbcm5719-llvm-a9be73929f6876c5a21750e361b279e9d84ee19a.tar.gz
bcm5719-llvm-a9be73929f6876c5a21750e361b279e9d84ee19a.zip
Make getAlignOf return an i64, for consistency with getSizeOf and
getOffsetOf, and remove the comment about assuming i8 is byte-aligned, which is no longer applicable. llvm-svn: 94738
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/Constants.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index 9e1154e95e3..1415944885b 100644
--- a/llvm/lib/VMCore/Constants.cpp
+++ b/llvm/lib/VMCore/Constants.cpp
@@ -1484,12 +1484,12 @@ Constant* ConstantExpr::getAlignOf(const Type* Ty) {
const Type *AligningTy = StructType::get(Ty->getContext(),
Type::getInt1Ty(Ty->getContext()), Ty, NULL);
Constant *NullPtr = Constant::getNullValue(AligningTy->getPointerTo());
- Constant *Zero = ConstantInt::get(Type::getInt32Ty(Ty->getContext()), 0);
+ Constant *Zero = ConstantInt::get(Type::getInt64Ty(Ty->getContext()), 0);
Constant *One = ConstantInt::get(Type::getInt32Ty(Ty->getContext()), 1);
Constant *Indices[2] = { Zero, One };
Constant *GEP = getGetElementPtr(NullPtr, Indices, 2);
return getCast(Instruction::PtrToInt, GEP,
- Type::getInt32Ty(Ty->getContext()));
+ Type::getInt64Ty(Ty->getContext()));
}
Constant* ConstantExpr::getOffsetOf(const StructType* STy, unsigned FieldNo) {
OpenPOWER on IntegriCloud