]> granicus.if.org Git - clang/commitdiff
Make nonfragile-abi the default for darwin's 64bit
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 12 Feb 2009 17:54:33 +0000 (17:54 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 12 Feb 2009 17:54:33 +0000 (17:54 +0000)
abi for objective-c programs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64386 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp

index 80fbaaeb728822e300396b7fb89a0594eaa523d4..c72982bf2216fb7f6378dab84ad68a9bf8f41920 100644 (file)
@@ -149,8 +149,12 @@ static void GetDarwinLanguageOptions(LangOptions &Opts,
     return;
   
   // Blocks default to on for 10.6 (darwin10) and beyond.
-  if (Maj > 9)
+  // As does nonfragile-abi for 64bit mode
+  if (Maj > 9) {
     Opts.Blocks = 1;
+    if (Opts.ObjC1 && !strncmp(Triple, "x86_64", 6))
+      Opts.ObjCNonFragileABI = 1;
+  }
 }