From b10f273eb60db2f2205b955fe4f7a43e09a5e2f2 Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Fri, 4 Apr 2008 22:58:22 +0000 Subject: [PATCH] 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 --- Driver/RewriteTest.cpp | 6 ++---- 1 file 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 \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 \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); -- 2.40.0