gcc no longer defines __block to nothing when blocks aren't enabled.

llvm-svn: 57129
This commit is contained in:
Chris Lattner 2008-10-05 19:32:52 +00:00
parent 1f7e2d5430
commit 248d3c4192
1 changed files with 1 additions and 4 deletions

View File

@ -436,10 +436,7 @@ static void InitializePredefinedMacros(Preprocessor &PP,
if (PP.getLangOptions().Blocks) {
DefineBuiltinMacro(Buf, "__block=__attribute__((__blocks__(byref)))");
DefineBuiltinMacro(Buf, "__BLOCKS__=1");
} else
// This allows "__block int unusedVar;" even when blocks are disabled.
// This is modeled after GCC's handling of __strong/__weak.
DefineBuiltinMacro(Buf, "__block=");
}
if (PP.getLangOptions().CPlusPlus) {
DefineBuiltinMacro(Buf, "__DEPRECATED=1");