Force clang to produce legacy api for messaging

in for pre-snowleoprd (NeXt runtime). Fixes
radar 7866951

llvm-svn: 101791
This commit is contained in:
Fariborz Jahanian 2010-04-19 17:53:30 +00:00
parent b0071d041f
commit dfb3983525
2 changed files with 23 additions and 1 deletions

View File

@ -4264,7 +4264,10 @@ void CGObjCNonFragileABIMac::FinishNonFragileABIModule() {
bool CGObjCNonFragileABIMac::LegacyDispatchedSelector(Selector Sel) {
if (CGM.getCodeGenOpts().ObjCLegacyDispatch)
return true;
/* Leopard */
if (CGM.getContext().Target.getTriple().getDarwinMajorNumber() <= 9)
return false;
if (NonLegacyDispatchMethods.empty()) {
NonLegacyDispatchMethods.insert(GetNullarySelector("alloc"));
NonLegacyDispatchMethods.insert(GetNullarySelector("class"));

View File

@ -0,0 +1,19 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-nonfragile-abi -emit-llvm -o - %s | FileCheck -check-prefix LP64 %s
// rdar: // 7866951
@interface NSObject
- (id)init;
@end
@interface ClangTest : NSObject @end
@implementation ClangTest
- (id)init
{
[super init];
return self;
}
@end
// CHECK-LP64: objc_msgSendSuper2_fixup_init
// CHECK-LP64: objc_msgSendSuper2_fixup