aboutsummaryrefslogtreecommitdiff
path: root/lib/Rewrite
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-06-29 19:33:05 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-06-29 19:33:05 +0000
commit49f6dacd450dca1cbffc4d7ef561442f653899e3 (patch)
tree7021da4d7a709a5e858ff0ce59bde93f1ecf84a1 /lib/Rewrite
parent2578532c7323efdd68ec42a31b7bdf72e5218867 (diff)
modern objc translator: string.h is unavailable on some non-OSX
platforms declare memset in rewritten code instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite')
-rw-r--r--lib/Rewrite/RewriteModernObjC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Rewrite/RewriteModernObjC.cpp b/lib/Rewrite/RewriteModernObjC.cpp
index b0f4c0d084..a14a9efb78 100644
--- a/lib/Rewrite/RewriteModernObjC.cpp
+++ b/lib/Rewrite/RewriteModernObjC.cpp
@@ -5958,7 +5958,7 @@ void RewriteModernObjC::Initialize(ASTContext &context) {
}
// needed for use of memset.
- Preamble += "\n#include <string.h>\n";
+ Preamble += "\nextern \"C\" void * memset(void *b, int c, unsigned long len);\n";
// Declarations required for modern objective-c array and dictionary literals.
Preamble += "\n#include <stdarg.h>\n";