modern objective-c translator: insert couple of pragmas for optimization.
// rdar://11079898
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153145 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Rewrite/RewriteModernObjC.cpp b/lib/Rewrite/RewriteModernObjC.cpp
index fed50b1..a164f74 100644
--- a/lib/Rewrite/RewriteModernObjC.cpp
+++ b/lib/Rewrite/RewriteModernObjC.cpp
@@ -6337,6 +6337,8 @@
void RewriteModernObjC::RewriteMetaDataIntoBuffer(std::string &Result) {
int ClsDefCount = ClassImplementation.size();
int CatDefCount = CategoryImplementation.size();
+ if (LangOpts.MicrosoftExt)
+ Result += "#pragma optimize(\"g\", on)";
// For each implemented class, write out all its meta data.
for (int i = 0; i < ClsDefCount; i++)
@@ -6406,6 +6408,8 @@
}
Result += "};\n";
}
+ if (LangOpts.MicrosoftExt)
+ Result += "#pragma optimize(\"\", on)\n";
}
void RewriteModernObjC::WriteImageInfo(std::string &Result) {