[cfe-commits] r56503 - /cfe/trunk/lib/Lex/Preprocessor.cpp
Mike Stump
mrs at apple.com
Tue Sep 23 17:30:59 PDT 2008
On Sep 23, 2008, at 2:28 PM, Steve Naroff wrote:
> --- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
> +++ cfe/trunk/lib/Lex/Preprocessor.cpp Tue Sep 23 16:28:24 2008
> @@ -477,9 +477,10 @@
> DefineBuiltinMacro(Buf, "__declspec(X)=");
> }
> // Directly modeled after the attribute-based implementation in GCC.
> - if (PP.getLangOptions().Blocks)
> + if (PP.getLangOptions().Blocks) {
> DefineBuiltinMacro(Buf, "__block=__attribute__((__blocks__
> (byref)))");
> - else
> + 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=");
Hum, this reminds be of radr://6230656 :
Index: lib/Lex/Preprocessor.cpp
===================================================================
--- lib/Lex/Preprocessor.cpp (revision 56525)
+++ lib/Lex/Preprocessor.cpp (working copy)
@@ -480,10 +480,7 @@
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=");
+ }
// FIXME: Should emit a #line directive here.
}
I can't build right now, so, I can't build/check it... Feel free to
check it in, if you like it.
More information about the cfe-commits
mailing list