mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user