Arch == llvm::Triple::x86_64)
return false;
}
+ else if (isNeXTFamily() && getVersion().getMajor() == 10) {
+ unsigned minor = 0;
+ if (getVersion().getMinor().hasValue())
+ minor = getVersion().getMinor().getValue();
+ if (minor == 5 &&
+ (Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64))
+ return false;
+ }
+ // Except for deployment target of 10.5,
// Mac runtimes use legacy dispatch everywhere now.
return true;
}
ObjCRuntime objcRuntime = AddObjCRuntimeArgs(Args, CmdArgs, rewriteKind);
// -fobjc-dispatch-method is only relevant with the nonfragile-abi, and
- // legacy is the default. Next runtime is always legacy dispatch and
- // -fno-objc-legacy-dispatch gets ignored silently.
- if (objcRuntime.isNonFragile() && !objcRuntime.isNeXTFamily()) {
+ // legacy is the default. Except for deployment taget of 10.5,
+ // next runtime is always legacy dispatch and -fno-objc-legacy-dispatch
+ // gets ignored silently.
+ if (objcRuntime.isNonFragile()) {
if (!Args.hasFlag(options::OPT_fobjc_legacy_dispatch,
options::OPT_fno_objc_legacy_dispatch,
objcRuntime.isLegacyDispatchDefaultForArch(
// CHECK-CHECK-X86_64_OSX10_5: "-cc1"
// CHECK-CHECK-X86_64_OSX10_5: -fobjc-runtime=macosx-10.5
+// CHECK-CHECK-X86_64_OSX10_5: -fobjc-dispatch-method=non-legacy
// CHECK-CHECK-X86_64_OSX10_5: darwin-objc-defaults
// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \