aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-15 19:04:46 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-15 19:04:46 +0000
commitf59c1a6d27ff23fb0ea1f5b94be0e1dc866f68b9 (patch)
treee88cfe75601cb84474d12ba62d6c03b43ea426bd
parent33af70f0f003d9765b92621f4fdd801e2b6c0ae7 (diff)
Fix alignment on obj_msgrefs to match llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69199 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGObjCMac.cpp3
-rw-r--r--test/CodeGenObjC/metadata-symbols-64.m1
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index e1b14913cd..90ef11e55a 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -4989,8 +4989,7 @@ CodeGen::RValue CGObjCNonFragileABIMac::EmitMessageSend(
Name,
&CGM.getModule());
GV->setVisibility(llvm::GlobalValue::HiddenVisibility);
- GV->setAlignment(
- CGM.getTargetData().getPrefTypeAlignment(ObjCTypes.MessageRefTy));
+ GV->setAlignment(16);
GV->setSection("__DATA, __objc_msgrefs, coalesced");
UsedGlobals.push_back(GV);
}
diff --git a/test/CodeGenObjC/metadata-symbols-64.m b/test/CodeGenObjC/metadata-symbols-64.m
index 86e8290329..a3d5bc9525 100644
--- a/test/CodeGenObjC/metadata-symbols-64.m
+++ b/test/CodeGenObjC/metadata-symbols-64.m
@@ -35,6 +35,7 @@
// RUN: grep '@"\\01l_OBJC_LABEL_PROTOCOL_$_P" = weak hidden global .* section "__DATA, __objc_protolist, coalesced, no_dead_strip", align 8' %t &&
// RUN: grep '@"\\01l_OBJC_METACLASS_RO_$_A" = internal global .* section "__DATA, __objc_const", align 8' %t &&
// RUN: grep '@"\\01l_OBJC_PROTOCOL_$_P" = weak hidden global .* section "__DATA,__datacoal_nt,coalesced", align 8' %t &&
+// RUN: grep '@"\\01l_objc_msgSend_fixup_alloc" = weak hidden global .* section "__DATA, __objc_msgrefs, coalesced", align 16' %t &&
// RUN: grep '@_objc_empty_cache = external global' %t &&
// RUN: grep '@_objc_empty_vtable = external global' %t &&