[cfe-commits] r152496 - /cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp
Fariborz Jahanian
fjahanian at apple.com
Sat Mar 10 09:45:38 PST 2012
Author: fjahanian
Date: Sat Mar 10 11:45:38 2012
New Revision: 152496
URL: http://llvm.org/viewvc/llvm-project?rev=152496&view=rev
Log:
objc modern rewriter: Define __OBJC2__ in written file.
// rdar://11024543
Modified:
cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp
Modified: cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp?rev=152496&r1=152495&r2=152496&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp (original)
+++ cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp Sat Mar 10 11:45:38 2012
@@ -5146,6 +5146,10 @@
void RewriteModernObjC::Initialize(ASTContext &context) {
InitializeCommon(context);
+ Preamble += "#ifndef __OBJC2__\n";
+ Preamble += "#define __OBJC2__\n";
+ Preamble += "#endif\n";
+
// declaring objc_selector outside the parameter list removes a silly
// scope related warning...
if (IsHeader)
More information about the cfe-commits
mailing list