Fix <rdar://problem/5976164> clang ObjC rewriter: for ... in enumeration inserts undeclared function (objc_enumerationMutation should be in preamble)

llvm-svn: 51880
This commit is contained in:
Steve Naroff 2008-06-02 20:23:21 +00:00
parent 9494a03df8
commit f611964230
1 changed files with 1 additions and 0 deletions

View File

@ -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";