mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-14 17:34:41 +00:00
Simplify getIntPtrType, allowing it to work for arbitrary pointer sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42751 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c318329a10
commit
8e41ed7c4e
@ -565,12 +565,7 @@ unsigned char TargetData::getPreferredTypeAlignmentShift(const Type *Ty) const {
|
||||
/// getIntPtrType - Return an unsigned integer type that is the same size or
|
||||
/// greater to the host pointer size.
|
||||
const Type *TargetData::getIntPtrType() const {
|
||||
switch (getPointerSize()) {
|
||||
default: assert(0 && "Unknown pointer size!");
|
||||
case 2: return Type::Int16Ty;
|
||||
case 4: return Type::Int32Ty;
|
||||
case 8: return Type::Int64Ty;
|
||||
}
|
||||
return IntegerType::get(getPointerSizeInBits());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user