[cfe-commits] r56503 - /cfe/trunk/lib/Lex/Preprocessor.cpp
Steve Naroff
snaroff at apple.com
Tue Sep 23 14:28:24 PDT 2008
Author: snaroff
Date: Tue Sep 23 16:28:24 2008
New Revision: 56503
URL: http://llvm.org/viewvc/llvm-project?rev=56503&view=rev
Log:
Fix <rdar://problem/6240065> clang: __BLOCKS__ should be defined.
Modified:
cfe/trunk/lib/Lex/Preprocessor.cpp
Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=56503&r1=56502&r2=56503&view=diff
==============================================================================
--- 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=");
More information about the cfe-commits
mailing list