diff options
author | Steve Naroff <snaroff@apple.com> | 2008-09-02 15:20:19 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-09-02 15:20:19 +0000 |
commit | 042f955a20e67cd8c8cdfede96bc6ec5a7234294 (patch) | |
tree | 618711ba7a58fbbe2baa8226df7061b3c543af29 /lib/Lex/Preprocessor.cpp | |
parent | 24653e8010dd4e4226a3889ed5c426ae248ae553 (diff) |
Implement block pseudo-storage class modifiers (__block, __byref).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 18b106ad84..27c2e676e6 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -476,6 +476,13 @@ static void InitializePredefinedMacros(Preprocessor &PP, DefineBuiltinMacro(Buf, "__int64=long long"); DefineBuiltinMacro(Buf, "__declspec(X)="); } + if (PP.getLangOptions().Blocks) { + DefineBuiltinMacro(Buf, "__byref=__attribute__((__blocks__(byref)))"); + DefineBuiltinMacro(Buf, "__block=__attribute__((__blocks__(byref)))"); + } else { + DefineBuiltinMacro(Buf, "__byref="); + DefineBuiltinMacro(Buf, "__block="); + } // FIXME: Should emit a #line directive here. } |