From: Douglas Gregor Date: Wed, 12 Oct 2011 18:28:53 +0000 (+0000) Subject: The Objective-C rewriter uses the fragile ABI, always. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d596c4d3f8931f4d479e965bf46d0e7edad85570;p=clang The Objective-C rewriter uses the fragile ABI, always. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141795 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index e0efe82286..5bf0d2627d 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -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; diff --git a/test/Driver/rewrite-objc.m b/test/Driver/rewrite-objc.m index 893b915d7e..6164e2c5c8 100644 --- a/test/Driver/rewrite-objc.m +++ b/test/Driver/rewrite-objc.m @@ -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"