#include <TargetInfo.hpp>
Public Types | |
| enum | Type { POINTER, BOOL, CHAR, SHORT, INT, LONG, LLONG, FLOAT, DOUBLE, LDOUBLE, ENUM, VECTOR, LASTTYPE } |
Public Member Functions | |
| TargetInfo () | |
| size_t | getSize (Type t) const |
| size_t | getBitSize (Type t) const |
| size_t | getAlign (Type t) const |
| void | setSize (Type t, size_t s) |
| void | setAlign (Type t, size_t align) |
Private Attributes | |
| size_t | sizes_ [LASTTYPE] |
| size_t | aligns_ [LASTTYPE] |
Definition at line 42 of file TargetInfo.hpp.
C Types used for TargetInfo.
Definition at line 48 of file TargetInfo.hpp.
| cfront::TargetInfo::TargetInfo | ( | ) | [inline] |
Definition at line 64 of file TargetInfo.hpp.
| size_t cfront::TargetInfo::getSize | ( | Type | t | ) | const [inline] |
Return the type size in bytes.
Definition at line 71 of file TargetInfo.hpp.
References sizes_.
Referenced by cfront::VectorType::getSize(), cfront::PointerType::getSize(), cfront::FunctionType::getSize(), cfront::EnumType::getSize(), cfront::BasicType::getSize(), and TypeTest::testSizeofType().
| size_t cfront::TargetInfo::getBitSize | ( | Type | t | ) | const [inline] |
| size_t cfront::TargetInfo::getAlign | ( | Type | t | ) | const [inline] |
Return the alignment of the type.
Definition at line 88 of file TargetInfo.hpp.
References aligns_.
Referenced by cfront::VectorType::getAlign(), cfront::PointerType::getAlign(), cfront::FunctionType::getAlign(), cfront::EnumType::getAlign(), and cfront::BasicType::getAlign().
| void cfront::TargetInfo::setSize | ( | Type | t, | |
| size_t | s | |||
| ) | [inline] |
Set the size of the type in bytes.
Definition at line 96 of file TargetInfo.hpp.
References sizes_.
Referenced by makeDefaultTargetInfo(), and makeTargetInfo().
| void cfront::TargetInfo::setAlign | ( | Type | t, | |
| size_t | align | |||
| ) | [inline] |
Set the alignment of the type.
Definition at line 104 of file TargetInfo.hpp.
References aligns_.
Referenced by makeDefaultTargetInfo(), and makeTargetInfo().
size_t cfront::TargetInfo::sizes_[LASTTYPE] [private] |
Definition at line 111 of file TargetInfo.hpp.
Referenced by getBitSize(), getSize(), and setSize().
size_t cfront::TargetInfo::aligns_[LASTTYPE] [private] |
1.5.6