Driver: Fix spurious warning (from -cc1) about unused -fapple-kext on C inputs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124875 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index f3d2d4b..2cbf43e 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1358,7 +1358,7 @@
// 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");