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 | 40c5e1ada70f0a8d69c741c048d218634cc588dd (patch) | |
tree | cea67c2400dcf0aeee217cc87a339966a649cba4 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | c05ba2ef122194ef6806a318e4064087b90329a2 (diff) | |
download | bcm5719-llvm-40c5e1ada70f0a8d69c741c048d218634cc588dd.tar.gz bcm5719-llvm-40c5e1ada70f0a8d69c741c048d218634cc588dd.zip |
Teach objc-rewriter to pass -fobjc-exceptions along.
llvm-svn: 126497
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 0a1b2572d54..b9d15ad01ab 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/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 |