mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
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:
parent
7be2a12065
commit
6edde961e2
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user