Teach objc-rewriter to pass -fobjc-exceptions along.

llvm-svn: 126497
This commit is contained in:
Fariborz Jahanian 2011-02-25 17:24:55 +00:00
parent c05ba2ef12
commit 40c5e1ada7
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -rewrite-objc -fobjc-exceptions %s -o -
// RUN: %clang_cc1 -rewrite-objc %s -o -
@interface Foo @end
@interface GARF @end