summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-02-19 23:53:54 +0000
committerAnders Carlsson <andersca@mac.com>2011-02-19 23:53:54 +0000
commitce8dd3a5d474b40ab4399aeab94d616f7f2b1055 (patch)
tree09cb9dc1e0bb7c465e2a4008b74b36c799db56e8 /clang/lib/Driver/Tools.cpp
parent8f5cf74c77e65847201cb7d0c894d2f7b78366be (diff)
downloadbcm5719-llvm-ce8dd3a5d474b40ab4399aeab94d616f7f2b1055.tar.gz
bcm5719-llvm-ce8dd3a5d474b40ab4399aeab94d616f7f2b1055.zip
Add a new ObjCExceptions member variable to LangOptions. This controls whether Objective-C exceptions are enabled or not (they are by default).
llvm-svn: 126061
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 75e0b3dfb96..6717349b976 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/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,
OpenPOWER on IntegriCloud