diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-02-25 17:24:55 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-02-25 17:24:55 +0000 |
commit | e293d30e858e38f2bb028c37ecac2178f8d78aa9 (patch) | |
tree | 3772a9b4dd26c799ef1cde8beac034b6cb4835f1 /lib/Frontend/CompilerInvocation.cpp | |
parent | 0cfaf6a270ecd0f5c7e541a8047c87948317548b (diff) | |
download | clang-e293d30e858e38f2bb028c37ecac2178f8d78aa9.tar.gz |
Teach objc-rewriter to pass -fobjc-exceptions along.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 0a1b2572d5..b9d15ad01a 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -1663,8 +1663,11 @@ void CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, InputKind DashX = ParseFrontendArgs(Res.getFrontendOpts(), *Args, Diags); ParseCodeGenArgs(Res.getCodeGenOpts(), *Args, DashX, Diags); ParseHeaderSearchArgs(Res.getHeaderSearchOpts(), *Args); - if (DashX != IK_AST && DashX != IK_LLVM_IR) + if (DashX != IK_AST && DashX != IK_LLVM_IR) { ParseLangArgs(Res.getLangOpts(), *Args, DashX, Diags); + if (Res.getFrontendOpts().ProgramAction == frontend::RewriteObjC) + Res.getLangOpts().ObjCExceptions = 1; + } // FIXME: ParsePreprocessorArgs uses the FileManager to read the contents of // PCH file and find the original header name. Remove the need to do that in // ParsePreprocessorArgs and remove the FileManager |