]> granicus.if.org Git - clang/commitdiff
gcc no longer defines __block to nothing when blocks aren't enabled.
authorChris Lattner <sabre@nondot.org>
Sun, 5 Oct 2008 19:32:52 +0000 (19:32 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 5 Oct 2008 19:32:52 +0000 (19:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57129 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Preprocessor.cpp

index 4cd8bce6aa8484f90704afc84ab21f2bb3469dcb..c97cda3bcd3a6b047abd7aa5211c70436f8dc444 100644 (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");