mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
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
This commit is contained in:
@@ -558,7 +558,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// getSizeOf constant expr - computes the size of a type in a target
|
/// getSizeOf constant expr - computes the size of a type in a target
|
||||||
/// independent way (Note: the return type is UInt but the object is not
|
/// independent way (Note: the return type is ULong but the object is not
|
||||||
/// necessarily a ConstantUInt).
|
/// necessarily a ConstantUInt).
|
||||||
///
|
///
|
||||||
static Constant *getSizeOf(const Type *Ty);
|
static Constant *getSizeOf(const Type *Ty);
|
||||||
|
@@ -1255,12 +1255,11 @@ Constant *ConstantExpr::getZeroExtend(Constant *C, const Type *Ty) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Constant *ConstantExpr::getSizeOf(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(
|
return getCast(
|
||||||
getGetElementPtr(
|
getGetElementPtr(getNullValue(PointerType::get(Ty)),
|
||||||
getNullValue(PointerType::get(Ty)),
|
std::vector<Constant*>(1, ConstantInt::get(Type::UIntTy, 1))),
|
||||||
std::vector<Constant*>(1, ConstantInt::get(Type::UIntTy, 1))),
|
Type::ULongTy);
|
||||||
Type::UIntTy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Constant *ConstantExpr::getTy(const Type *ReqTy, unsigned Opcode,
|
Constant *ConstantExpr::getTy(const Type *ReqTy, unsigned Opcode,
|
||||||
|
Reference in New Issue
Block a user