To figure out the size of data varaibles for my backend, I tries this code
stolen from X86 backend:
const TargetData& TD = m_tm.getTargetData();
unsigned size = TD.getTypeSize(initializer->getType());
However, the getTypeInfo function in TargetData.cpp contains this:
case Type::SByteTyID: Size = 1; Alignment = TD->getByteAlignment();
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, what am I to do, except for copy-pasting the function and adjusting sizes?