mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-11 11:34:02 +00:00
add a method to get the alignment of an integer type even
when we don't have one laying around. Useful if you don't have an llvmcontext handy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
aeb326aad7
commit
da63b3ad63
@ -225,6 +225,11 @@ public:
|
|||||||
/// specified type.
|
/// specified type.
|
||||||
unsigned char getABITypeAlignment(const Type *Ty) const;
|
unsigned char getABITypeAlignment(const Type *Ty) const;
|
||||||
|
|
||||||
|
/// getABIIntegerTypeAlignment - Return the minimum ABI-required alignment for
|
||||||
|
/// an integer type of the specified bitwidth.
|
||||||
|
unsigned char getABIIntegerTypeAlignment(unsigned BitWidth) const;
|
||||||
|
|
||||||
|
|
||||||
/// getCallFrameTypeAlignment - Return the minimum ABI-required alignment
|
/// getCallFrameTypeAlignment - Return the minimum ABI-required alignment
|
||||||
/// for the specified type when it is part of a call frame.
|
/// for the specified type when it is part of a call frame.
|
||||||
unsigned char getCallFrameTypeAlignment(const Type *Ty) const;
|
unsigned char getCallFrameTypeAlignment(const Type *Ty) const;
|
||||||
|
@ -545,6 +545,13 @@ unsigned char TargetData::getABITypeAlignment(const Type *Ty) const {
|
|||||||
return getAlignment(Ty, true);
|
return getAlignment(Ty, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// getABIIntegerTypeAlignment - Return the minimum ABI-required alignment for
|
||||||
|
/// an integer type of the specified bitwidth.
|
||||||
|
unsigned char TargetData::getABIIntegerTypeAlignment(unsigned BitWidth) const {
|
||||||
|
return getAlignmentInfo(INTEGER_ALIGN, BitWidth, true, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned char TargetData::getCallFrameTypeAlignment(const Type *Ty) const {
|
unsigned char TargetData::getCallFrameTypeAlignment(const Type *Ty) const {
|
||||||
for (unsigned i = 0, e = Alignments.size(); i != e; ++i)
|
for (unsigned i = 0, e = Alignments.size(); i != e; ++i)
|
||||||
if (Alignments[i].AlignType == STACK_ALIGN)
|
if (Alignments[i].AlignType == STACK_ALIGN)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user