search for: getbytealignment

Displaying 1 result from an estimated 1 matches for "getbytealignment".

2004 Jun 19
1
[LLVMdev] The size of char
...getData& TD = m_tm.getTargetData(); unsigned size = TD.getTypeSize(initializer->getType()); However, the getTypeInfo function in TargetData.cpp contains this: case Type::VoidTyID: case Type::BoolTyID: case Type::UByteTyID: case Type::SByteTyID: Size = 1; Alignment = TD->getByteAlignment(); return; The problem is that my target can't address bytes -- the memory interface itself specifies word addresses. For that reason, I'd like to allocate 4-byte (word) blocks even for bools/chars/ubytes and so on. That's exactly what the standard compiler does, btw. So,...