Avoid redefinition of __objcFastEnumerationState

llvm-svn: 45842
This commit is contained in:
Fariborz Jahanian 2008-01-10 23:04:06 +00:00
parent f3bd2cd37c
commit af5d80cba5
1 changed files with 4 additions and 1 deletions

View File

@ -122,11 +122,14 @@ namespace {
"(struct objc_class *, struct objc_object *, ...);\n"
"extern Protocol *objc_getProtocol(const char *);\n"
"#include <objc/objc.h>\n"
"#ifndef __FASTENUMERATIONSTATE\n"
"struct __objcFastEnumerationState {\n\t"
"unsigned long state;\n\t"
"id *itemsPtr;\n\t"
"unsigned long *mutationsPtr;\n\t"
"unsigned long extra[5];\n};\n";
"unsigned long extra[5];\n};\n"
"#define __FASTENUMERATIONSTATE\n"
"#endif\n";
Rewrite.InsertText(SourceLocation::getFileLoc(MainFileID, 0),
s, strlen(s));