[cfe-commits] r126497 - in /cfe/trunk: lib/Frontend/CompilerInvocation.cpp test/Rewriter/rewrite-try-catch.m
Fariborz Jahanian
fjahanian at apple.com
Fri Feb 25 09:24:55 PST 2011
Author: fjahanian
Date: Fri Feb 25 11:24:55 2011
New Revision: 126497
URL: http://llvm.org/viewvc/llvm-project?rev=126497&view=rev
Log:
Teach objc-rewriter to pass -fobjc-exceptions along.
Modified:
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/test/Rewriter/rewrite-try-catch.m
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=126497&r1=126496&r2=126497&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Fri Feb 25 11:24:55 2011
@@ -1663,8 +1663,11 @@
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
Modified: cfe/trunk/test/Rewriter/rewrite-try-catch.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-try-catch.m?rev=126497&r1=126496&r2=126497&view=diff
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-try-catch.m (original)
+++ cfe/trunk/test/Rewriter/rewrite-try-catch.m Fri Feb 25 11:24:55 2011
@@ -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
More information about the cfe-commits
mailing list