summaryrefslogtreecommitdiffstats
path: root/clang/Driver/RewriteTest.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-04-04 22:58:22 +0000
committerSteve Naroff <snaroff@apple.com>2008-04-04 22:58:22 +0000
commit4dbab8a49d99e8a4a1479738346d541d954d0386 (patch)
tree99b6b05a6b8805aee08312c4ec711327403e8952 /clang/Driver/RewriteTest.cpp
parentaf91b9ae13c7e3d7c3a2b2ac7a883c510c259a49 (diff)
downloadbcm5719-llvm-4dbab8a49d99e8a4a1479738346d541d954d0386.tar.gz
bcm5719-llvm-4dbab8a49d99e8a4a1479738346d541d954d0386.zip
Avoid implicitly including any header files (requested by ckane).
llvm-svn: 49241
Diffstat (limited to 'clang/Driver/RewriteTest.cpp')
-rw-r--r--clang/Driver/RewriteTest.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/Driver/RewriteTest.cpp b/clang/Driver/RewriteTest.cpp
index 145c766d70d..26bfa01b268 100644
--- a/clang/Driver/RewriteTest.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud