[cfe-commits] r142418 - in /cfe/trunk: include/clang/Driver/CC1Options.td include/clang/Driver/Options.td lib/Driver/Tools.cpp lib/Frontend/CompilerInvocation.cpp test/Frontend/Inputs/TestFramework.framework/ test/Frontend/Inputs/TestFramework.framework/Headers/ test/Frontend/Inputs/TestFramework.framework/Headers/TestFramework.h test/Frontend/iframework.c
Daniel Dunbar
daniel at zuster.org
Tue Oct 18 13:40:38 PDT 2011
Author: ddunbar
Date: Tue Oct 18 15:40:38 2011
New Revision: 142418
URL: http://llvm.org/viewvc/llvm-project?rev=142418&view=rev
Log:
Frontend: Support -iframework.
Added:
cfe/trunk/test/Frontend/Inputs/TestFramework.framework/
cfe/trunk/test/Frontend/Inputs/TestFramework.framework/Headers/
cfe/trunk/test/Frontend/Inputs/TestFramework.framework/Headers/TestFramework.h
cfe/trunk/test/Frontend/iframework.c
Modified:
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=142418&r1=142417&r2=142418&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Tue Oct 18 15:40:38 2011
@@ -639,6 +639,8 @@
def objcxx_isystem : JoinedOrSeparate<"-objcxx-isystem">,
MetaVarName<"<directory>">,
HelpText<"Add directory to the ObjC++ SYSTEM include search path">;
+def iframework : JoinedOrSeparate<"-iframework">, MetaVarName<"<directory>">,
+ HelpText<"Add directory to SYSTEM framework search path">;
def isystem : JoinedOrSeparate<"-isystem">, MetaVarName<"<directory>">,
HelpText<"Add directory to SYSTEM include search path">;
def iwithsysroot : JoinedOrSeparate<"-iwithsysroot">,MetaVarName<"<directory>">,
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=142418&r1=142417&r2=142418&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Tue Oct 18 15:40:38 2011
@@ -517,7 +517,7 @@
def headerpad__max__install__names : Joined<"-headerpad_max_install_names">;
def index_header_map : Flag<"-index-header-map">;
def idirafter : JoinedOrSeparate<"-idirafter">, Group<clang_i_Group>;
-def iframework : JoinedOrSeparate<"-iframework">, Group<clang_i_Group>;
+def iframework : Joined<"-iframework">, Group<clang_i_Group>;
def imacros : JoinedOrSeparate<"-imacros">, Group<clang_i_Group>;
def image__base : Separate<"-image_base">;
def include_ : JoinedOrSeparate<"-include">, Group<clang_i_Group>, EnumName<"include">;
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=142418&r1=142417&r2=142418&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Oct 18 15:40:38 2011
@@ -1437,10 +1437,6 @@
types::ID InputType = Inputs[0].getType();
if (!Args.hasArg(options::OPT_fallow_unsupported)) {
Arg *Unsupported;
- if ((Unsupported = Args.getLastArg(options::OPT_iframework)))
- D.Diag(diag::err_drv_clang_unsupported)
- << Unsupported->getOption().getName();
-
if (types::isCXX(InputType) &&
getToolChain().getTriple().isOSDarwin() &&
getToolChain().getTriple().getArch() == llvm::Triple::x86) {
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=142418&r1=142417&r2=142418&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Tue Oct 18 15:40:38 2011
@@ -1450,6 +1450,10 @@
OPT_iwithsysroot), ie = Args.filtered_end(); it != ie; ++it)
Opts.AddPath((*it)->getValue(Args), frontend::System, true, false,
!(*it)->getOption().matches(OPT_iwithsysroot));
+ for (arg_iterator it = Args.filtered_begin(OPT_iframework),
+ ie = Args.filtered_end(); it != ie; ++it)
+ Opts.AddPath((*it)->getValue(Args), frontend::System, true, true,
+ true);
// Add the paths for the various language specific isystem flags.
for (arg_iterator it = Args.filtered_begin(OPT_c_isystem),
Added: cfe/trunk/test/Frontend/Inputs/TestFramework.framework/Headers/TestFramework.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/Inputs/TestFramework.framework/Headers/TestFramework.h?rev=142418&view=auto
==============================================================================
--- cfe/trunk/test/Frontend/Inputs/TestFramework.framework/Headers/TestFramework.h (added)
+++ cfe/trunk/test/Frontend/Inputs/TestFramework.framework/Headers/TestFramework.h Tue Oct 18 15:40:38 2011
@@ -0,0 +1 @@
+static int f0(void) {}
Added: cfe/trunk/test/Frontend/iframework.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/iframework.c?rev=142418&view=auto
==============================================================================
--- cfe/trunk/test/Frontend/iframework.c (added)
+++ cfe/trunk/test/Frontend/iframework.c Tue Oct 18 15:40:38 2011
@@ -0,0 +1,3 @@
+// RUN: %clang -fsyntax-only -iframework%S/Inputs %s -Xclang -verify
+
+#include <TestFramework/TestFramework.h>
More information about the cfe-commits
mailing list