[cfe-commits] r62701 - /cfe/trunk/Driver/clang.cpp
Anders Carlsson
andersca at mac.com
Wed Jan 21 10:47:37 PST 2009
Author: andersca
Date: Wed Jan 21 12:47:36 2009
New Revision: 62701
URL: http://llvm.org/viewvc/llvm-project?rev=62701&view=rev
Log:
Don't turn off blocks when compiling Obj-C code
Modified:
cfe/trunk/Driver/clang.cpp
Modified: cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/clang.cpp?rev=62701&r1=62700&r2=62701&view=diff
==============================================================================
--- cfe/trunk/Driver/clang.cpp (original)
+++ cfe/trunk/Driver/clang.cpp Wed Jan 21 12:47:36 2009
@@ -595,7 +595,8 @@
// If in a conformant language mode (e.g. -std=c99) Blocks defaults to off
// even if they are normally on for the target. In GNU modes (e.g.
// -std=gnu99) the default for blocks depends on the target settings.
- if (LangStd < lang_gnu_START)
+ // However, blocks are not turned off when compiling Obj-C or Obj-C++ code.
+ if (!Options.ObjC1 && LangStd < lang_gnu_START)
Options.Blocks = 0;
Options.DollarIdents = 1; // FIXME: Really a target property.
More information about the cfe-commits
mailing list