forked from OSchip/llvm-project
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:
parent
b0071d041f
commit
dfb3983525
|
@ -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"));
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue