r175414 - Unify some "kernel or kext" conditionals.
Eric Christopher
echristo at gmail.com
Sun Feb 17 17:16:38 PST 2013
Author: echristo
Date: Sun Feb 17 19:16:37 2013
New Revision: 175414
URL: http://llvm.org/viewvc/llvm-project?rev=175414&view=rev
Log:
Unify some "kernel or kext" conditionals.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=175414&r1=175413&r2=175414&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Sun Feb 17 19:16:37 2013
@@ -1914,8 +1914,7 @@ void Clang::ConstructJob(Compilation &C,
// Note that these flags are trump-cards. Regardless of the order w.r.t. the
// PIC or PIE options above, if these show up, PIC is disabled.
llvm::Triple Triple(TripleStr);
- if ((Args.hasArg(options::OPT_mkernel) ||
- Args.hasArg(options::OPT_fapple_kext)) &&
+ if (KernelOrKext &&
(Triple.getOS() != llvm::Triple::IOS ||
Triple.isOSVersionLT(6)))
PIC = PIE = false;
@@ -2975,8 +2974,7 @@ void Clang::ConstructJob(Compilation &C,
CmdArgs.push_back("-fpack-struct=1");
}
- if (Args.hasArg(options::OPT_mkernel) ||
- Args.hasArg(options::OPT_fapple_kext)) {
+ if (KernelOrKext) {
if (!Args.hasArg(options::OPT_fcommon))
CmdArgs.push_back("-fno-common");
Args.ClaimAllArgs(options::OPT_fno_common);
@@ -3982,7 +3980,7 @@ void darwin::Assemble::ConstructJob(Comp
if (getToolChain().getTriple().getArch() != llvm::Triple::x86_64 &&
(((Args.hasArg(options::OPT_mkernel) ||
- Args.hasArg(options::OPT_fapple_kext)) &&
+ Args.hasArg(options::OPT_fapple_kext)) &&
(!getDarwinToolChain().isTargetIPhoneOS() ||
getDarwinToolChain().isIPhoneOSVersionLT(6, 0))) ||
Args.hasArg(options::OPT_static)))
More information about the cfe-commits
mailing list