aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-10-12 18:28:53 +0000
committerDouglas Gregor <dgregor@apple.com>2011-10-12 18:28:53 +0000
commitd596c4d3f8931f4d479e965bf46d0e7edad85570 (patch)
tree194f03ead69e48446840122d664b542059721f19
parent920c9c1155c118ac40e5209d4b757b9f54186339 (diff)
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
-rw-r--r--lib/Driver/Tools.cpp4
-rw-r--r--test/Driver/rewrite-objc.m2
2 files changed, 4 insertions, 2 deletions
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"