]> granicus.if.org Git - clang/commitdiff
The Objective-C rewriter uses the fragile ABI, always.
authorDouglas Gregor <dgregor@apple.com>
Wed, 12 Oct 2011 18:28:53 +0000 (18:28 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 12 Oct 2011 18:28:53 +0000 (18:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141795 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp
test/Driver/rewrite-objc.m

index e0efe822864ac59d1c4c84c84fbcd3e6ab345455..5bf0d2627d95ee7b3394af86c616052989cfe6f0 100644 (file)
@@ -1907,9 +1907,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
       D.Diag(diag::err_drv_clang_unsupported) << A->getAsString(Args);
   } else {
     // Otherwise, determine if we are using the non-fragile ABI.
+    bool NonFragileABIIsDefault
+      = (!IsRewriter && getToolChain().IsObjCNonFragileABIDefault());
     if (Args.hasFlag(options::OPT_fobjc_nonfragile_abi,
                      options::OPT_fno_objc_nonfragile_abi,
-                     getToolChain().IsObjCNonFragileABIDefault())) {
+                     NonFragileABIIsDefault)) {
       // Determine the non-fragile ABI version to use.
 #ifdef DISABLE_DEFAULT_NONFRAGILEABI_TWO
       unsigned NonFragileABIVersion = 1;
index 893b915d7e01caddaeef8f915ed697e71f396fcf..6164e2c5c8eef211555e2f0bd564bb40550bd2c4 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang -ccc-host-triple unknown -rewrite-objc %s -o - -### 2>&1 | \
+// RUN: %clang -ccc-host-triple x86_64-apple-macosx10.7.0 -rewrite-objc %s -o - -### 2>&1 | \
 // RUN:   FileCheck -check-prefix=TEST0 %s
 // TEST0: clang{{.*}}" "-cc1"
 // TEST0: "-rewrite-objc"