summaryrefslogtreecommitdiffstats
path: root/clang/Driver/RewriteTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/Driver/RewriteTest.cpp')
-rw-r--r--clang/Driver/RewriteTest.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/Driver/RewriteTest.cpp b/clang/Driver/RewriteTest.cpp
index 529f524d59f..6f6bfc23546 100644
--- a/clang/Driver/RewriteTest.cpp
+++ b/clang/Driver/RewriteTest.cpp
@@ -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));
OpenPOWER on IntegriCloud