[cfe-commits] r126654 - /cfe/trunk/lib/Driver/Tools.cpp
David Chisnall
csdavec at swan.ac.uk
Mon Feb 28 09:11:43 PST 2011
Author: theraven
Date: Mon Feb 28 11:11:43 2011
New Revision: 126654
URL: http://llvm.org/viewvc/llvm-project?rev=126654&view=rev
Log:
Make -fobjc-nonfragile-abi and -fgnu-runtime imply -fblocks (unless -fno-blocks is specified), because this combination of flags defines an Objective-C runtime that includes a blocks runtime.
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=126654&r1=126653&r2=126654&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Feb 28 11:11:43 2011
@@ -1459,7 +1459,10 @@
// -fblocks=0 is default.
if (Args.hasFlag(options::OPT_fblocks, options::OPT_fno_blocks,
- getToolChain().IsBlocksDefault())) {
+ getToolChain().IsBlocksDefault()) ||
+ (Args.hasArg(options::OPT_fgnu_runtime) &&
+ Args.hasArg(options::OPT_fobjc_nonfragile_abi) &&
+ !Args.hasArg(options::OPT_fno_blocks))) {
CmdArgs.push_back("-fblocks");
}
More information about the cfe-commits
mailing list