Alignment of pointers in __objc_classlist must be on their

natural alignment. Otherwise, the excess hole confuses the
objc2 runtime (this is darwin specific).

llvm-svn: 65666
This commit is contained in:
Fariborz Jahanian 2009-02-28 00:54:00 +00:00
parent 17c0d7bacf
commit cd073cc2e9

View File

@ -3394,6 +3394,8 @@ void CGObjCNonFragileABIMac::FinishNonFragileABIModule() {
Init,
"\01L_OBJC_LABEL_CLASS_$",
&CGM.getModule());
GV->setAlignment(
CGM.getTargetData().getPrefTypeAlignment(ObjCTypes.Int8PtrTy));
GV->setSection("__DATA, __objc_classlist, regular, no_dead_strip");
UsedGlobals.push_back(GV);
}