diff options
author | Steve Naroff <snaroff@apple.com> | 2008-04-04 22:58:22 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-04-04 22:58:22 +0000 |
commit | b10f273eb60db2f2205b955fe4f7a43e09a5e2f2 (patch) | |
tree | f637eee2f8f3d6a163cc3f1967b00d12713aee42 /Driver/RewriteTest.cpp | |
parent | c5e327712499caa2a9f3b6591490de8cb7df0b5b (diff) |
Avoid implicitly including any header files (requested by ckane).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49241 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteTest.cpp')
-rw-r--r-- | Driver/RewriteTest.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp index 145c766d70..26bfa01b26 100644 --- a/Driver/RewriteTest.cpp +++ b/Driver/RewriteTest.cpp @@ -327,11 +327,10 @@ void RewriteTest::Initialize(ASTContext &context) { Preamble += "extern Protocol *objc_getProtocol(const char *);\n"; if (LangOpts.Microsoft) Preamble += "} // end extern \"C\"\n"; - Preamble += "#include <objc/objc.h>\n"; Preamble += "#ifndef __FASTENUMERATIONSTATE\n"; Preamble += "struct __objcFastEnumerationState {\n\t"; Preamble += "unsigned long state;\n\t"; - Preamble += "id *itemsPtr;\n\t"; + Preamble += "void **itemsPtr;\n\t"; Preamble += "unsigned long *mutationsPtr;\n\t"; Preamble += "unsigned long extra[5];\n};\n"; Preamble += "#define __FASTENUMERATIONSTATE\n"; @@ -2912,8 +2911,7 @@ void RewriteTest::RewriteImplementations(std::string &Result) { RewriteImplementationDecl(CategoryImplementation[i]); // This is needed for use of offsetof - Result += "#include <stddef.h>\n"; - + Result += "#define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)\n"; // For each implemented class, write out all its meta data. for (int i = 0; i < ClsDefCount; i++) RewriteObjCClassMetaData(ClassImplementation[i], Result); |