aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCMac.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-02-28 00:54:00 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-02-28 00:54:00 +0000
commit5a1edf6c0dc70bd555e51bedba782da8e3552f94 (patch)
tree8e55e5d8fdfd5c39e41d165d2ed326209e82694f /lib/CodeGen/CGObjCMac.cpp
parentcd281c3ded486ced5aad29dd7c3fa22b7514c3d8 (diff)
Alignment of pointers in __objc_classlist must be on their
natural alignment. Otherwise, the excess hole confuses the objc2 runtime (this is darwin specific). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r--lib/CodeGen/CGObjCMac.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 6a806a3371..3beb91a29e 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -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);
}