]> granicus.if.org Git - clang/commitdiff
Driver: Fix spurious warning (from -cc1) about unused -fapple-kext on C inputs.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 4 Feb 2011 17:24:47 +0000 (17:24 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 4 Feb 2011 17:24:47 +0000 (17:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124875 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index f3d2d4b88bdbe19e93b7378bf83beff9247ea951..2cbf43e0e66e0acb75f515eb72d7b60e2a8ed097 100644 (file)
@@ -1358,7 +1358,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   // these by hand.
 
   if (Args.hasArg(options::OPT_mkernel)) {
-    if (!Args.hasArg(options::OPT_fapple_kext))
+    if (!Args.hasArg(options::OPT_fapple_kext) && types::isCXX(InputType))
       CmdArgs.push_back("-fapple-kext");
     if (!Args.hasArg(options::OPT_fbuiltin))
       CmdArgs.push_back("-fno-builtin");