mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Use type helper functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190113 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -451,7 +451,7 @@ inline uint64_t DataLayout::getTypeSizeInBits(Type *Ty) const {
|
||||
case Type::LabelTyID:
|
||||
return getPointerSizeInBits(0);
|
||||
case Type::PointerTyID:
|
||||
return getPointerSizeInBits(cast<PointerType>(Ty)->getAddressSpace());
|
||||
return getPointerSizeInBits(Ty->getPointerAddressSpace());
|
||||
case Type::ArrayTyID: {
|
||||
ArrayType *ATy = cast<ArrayType>(Ty);
|
||||
return ATy->getNumElements() *
|
||||
@@ -461,7 +461,7 @@ inline uint64_t DataLayout::getTypeSizeInBits(Type *Ty) const {
|
||||
// Get the layout annotation... which is lazily created on demand.
|
||||
return getStructLayout(cast<StructType>(Ty))->getSizeInBits();
|
||||
case Type::IntegerTyID:
|
||||
return cast<IntegerType>(Ty)->getBitWidth();
|
||||
return Ty->getIntegerBitWidth();
|
||||
case Type::HalfTyID:
|
||||
return 16;
|
||||
case Type::FloatTyID:
|
||||
|
Reference in New Issue
Block a user