From: Daniel Dunbar Date: Fri, 4 Feb 2011 17:24:47 +0000 (+0000) Subject: Driver: Fix spurious warning (from -cc1) about unused -fapple-kext on C inputs. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2843c1900b6da763885f47d0999e923e7c67fd65;p=clang 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 f3d2d4b88b..2cbf43e0e6 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -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");