aboutsummaryrefslogtreecommitdiff
path: root/Driver/RewriteObjC.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-06-02 20:23:21 +0000
committerSteve Naroff <snaroff@apple.com>2008-06-02 20:23:21 +0000
commit73ebd6d33de70d2a9859d2b43918c16993cee86b (patch)
tree8e9d80b7f7ed0d8edb7ff29b543e04b37a6f44c2 /Driver/RewriteObjC.cpp
parent0327f778699f0828b8ffb540e9d1e7cbe97d67a1 (diff)
Fix <rdar://problem/5976164> clang ObjC rewriter: for ... in enumeration inserts undeclared function (objc_enumerationMutation should be in preamble)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51880 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteObjC.cpp')
-rw-r--r--Driver/RewriteObjC.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp
index f679e554d0..694456d670 100644
--- a/Driver/RewriteObjC.cpp
+++ b/Driver/RewriteObjC.cpp
@@ -344,6 +344,7 @@ void RewriteObjC::Initialize(ASTContext &context) {
Preamble += "void **itemsPtr;\n\t";
Preamble += "unsigned long *mutationsPtr;\n\t";
Preamble += "unsigned long extra[5];\n};\n";
+ Preamble += "__OBJC_RW_EXTERN void objc_enumerationMutation(struct objc_object *);\n";
Preamble += "#define __FASTENUMERATIONSTATE\n";
Preamble += "#endif\n";
Preamble += "#ifndef __NSCONSTANTSTRINGIMPL\n";