Generalize TargetData strings, to support more interesting forms of data.

Patch by Scott Michel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34266 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2007-02-14 05:52:17 +00:00
parent 879dfe1c9c
commit d2b7cec527
13 changed files with 442 additions and 399 deletions

View File

@ -255,7 +255,7 @@ void ELFWriter::EmitGlobal(GlobalVariable *GV) {
}
const Type *GVType = (const Type*)GV->getType();
unsigned Align = TM.getTargetData()->getTypeAlignmentPref(GVType);
unsigned Align = TM.getTargetData()->getPrefTypeAlignment(GVType);
unsigned Size = TM.getTargetData()->getTypeSize(GVType);
// If this global has a zero initializer, it is part of the .bss or common