Don't turn off blocks when compiling Obj-C code

llvm-svn: 62701
This commit is contained in:
Anders Carlsson 2009-01-21 18:47:36 +00:00
parent f37530c944
commit e26b945b8d
1 changed files with 2 additions and 1 deletions

View File

@ -595,7 +595,8 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK,
// 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.