From 73ebd6d33de70d2a9859d2b43918c16993cee86b Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Mon, 2 Jun 2008 20:23:21 +0000 Subject: [PATCH] Fix 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 --- Driver/RewriteObjC.cpp | 1 + 1 file changed, 1 insertion(+) 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"; -- 2.50.1