aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-02-22 01:52:06 +0000
committerAnders Carlsson <andersca@mac.com>2011-02-22 01:52:06 +0000
commite9b801f7633b11b18d357a71442bd003435784e8 (patch)
tree402fc936a442aef1a0584bb77751e13753fc00de /lib/Driver/Tools.cpp
parent95bba6f26fa68cc8c163f35f4b4f218ab279117a (diff)
Make clang -cc1 disable Objective-C exceptions by default, and add a -fobjc-exceptions flag to turn them on.
Update all tests accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 2f264e5387..9f4a0bc162 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1546,10 +1546,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-fobjc-default-synthesize-properties");
}
- // -fobjc-exceptions is default.
- if (!Args.hasFlag(options::OPT_fobjc_exceptions,
- options::OPT_fno_objc_exceptions))
- CmdArgs.push_back("-fno-objc-exceptions");
+ // -fno-objc-exceptions is default.
+ if (IsRewriter || Args.hasFlag(options::OPT_fobjc_exceptions,
+ options::OPT_fno_objc_exceptions))
+ CmdArgs.push_back("-fobjc-exceptions");
}
if (!Args.hasFlag(options::OPT_fassume_sane_operator_new,