diff options
author | Anders Carlsson <andersca@mac.com> | 2011-02-19 23:53:54 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2011-02-19 23:53:54 +0000 |
commit | da4b7cf09ebfd4e4098b516081fa9dae2f5c99e0 (patch) | |
tree | b0fe5871f0554281f460a114de248e62a38875a2 /lib/Driver/Tools.cpp | |
parent | 4b93d660c6326ec79b5e369317d1051cf826c2f3 (diff) |
Add a new ObjCExceptions member variable to LangOptions. This controls whether Objective-C exceptions are enabled or not (they are by default).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126061 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 75e0b3dfb9..6717349b97 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1545,6 +1545,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, getToolChain().IsObjCDefaultSynthPropertiesDefault())) { 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"); } if (!Args.hasFlag(options::OPT_fassume_sane_operator_new, |