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 e0efe82..5bf0d26 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1907,9 +1907,11 @@
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;