objc modern rewriter: Define __OBJC2__ in written file.
// rdar://11024543



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152496 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Rewrite/RewriteModernObjC.cpp b/lib/Rewrite/RewriteModernObjC.cpp
index 3099499..87d49fd 100644
--- a/lib/Rewrite/RewriteModernObjC.cpp
+++ b/lib/Rewrite/RewriteModernObjC.cpp
@@ -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)