mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-27 14:24:40 +00:00
Add TargetData::fitsInLegalInteger().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127714 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -161,6 +161,17 @@ public:
|
|||||||
return !isLegalInteger(Width);
|
return !isLegalInteger(Width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// fitsInLegalInteger - This function returns true if the specified type fits
|
||||||
|
/// in a native integer type supported by the CPU. For example, if the CPU
|
||||||
|
/// only supports i32 as a native integer type, then i27 fits in a legal
|
||||||
|
// integer type but i45 does not.
|
||||||
|
bool fitsInLegalInteger(unsigned Width) const {
|
||||||
|
for (unsigned i = 0, e = (unsigned)LegalIntWidths.size(); i != e; ++i)
|
||||||
|
if (Width <= LegalIntWidths[i])
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/// Target pointer alignment
|
/// Target pointer alignment
|
||||||
unsigned getPointerABIAlignment() const { return PointerABIAlign; }
|
unsigned getPointerABIAlignment() const { return PointerABIAlign; }
|
||||||
/// Return target's alignment for stack-based pointers
|
/// Return target's alignment for stack-based pointers
|
||||||
|
Reference in New Issue
Block a user