Lines Matching refs:Preamble

74     std::string Preamble;
2534 Preamble += "static __NSConstantStringImpl " + S;
2535 Preamble += " __attribute__ ((section (\"__DATA, __cfstring\"))) = {__CFConstantStringClassReference,";
2536 Preamble += "0x000007c8,"; // utf8_str
2541 Preamble += prettyBuf.str();
2542 Preamble += ",";
2543 Preamble += utostr(Exp->getString()->getByteLength()) + "};\n";
5025 RewriteObjCProtocolMetaData(*I, "", "", Preamble);
5027 InsertText(SM->getLocForStartOfFile(MainFileID), Preamble, false);
5058 Preamble = "#pragma once\n";
5059 Preamble += "struct objc_selector; struct objc_class;\n";
5060 Preamble += "struct __rw_objc_super { struct objc_object *object; ";
5061 Preamble += "struct objc_object *superClass; ";
5064 Preamble += "__rw_objc_super(struct objc_object *o, struct objc_object *s) "
5066 Preamble += "object(o), superClass(s) {} ";
5068 Preamble += "};\n";
5069 Preamble += "#ifndef _REWRITER_typedef_Protocol\n";
5070 Preamble += "typedef struct objc_object Protocol;\n";
5071 Preamble += "#define _REWRITER_typedef_Protocol\n";
5072 Preamble += "#endif\n";
5074 Preamble += "#define __OBJC_RW_DLLIMPORT extern \"C\" __declspec(dllimport)\n";
5075 Preamble += "#define __OBJC_RW_STATICIMPORT extern \"C\"\n";
5077 Preamble += "#define __OBJC_RW_DLLIMPORT extern\n";
5078 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_msgSend";
5079 Preamble += "(struct objc_object *, struct objc_selector *, ...);\n";
5080 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_msgSendSuper";
5081 Preamble += "(struct objc_super *, struct objc_selector *, ...);\n";
5082 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object* objc_msgSend_stret";
5083 Preamble += "(struct objc_object *, struct objc_selector *, ...);\n";
5084 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object* objc_msgSendSuper_stret";
5085 Preamble += "(struct objc_super *, struct objc_selector *, ...);\n";
5086 Preamble += "__OBJC_RW_DLLIMPORT double objc_msgSend_fpret";
5087 Preamble += "(struct objc_object *, struct objc_selector *, ...);\n";
5088 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_getClass";
5089 Preamble += "(const char *);\n";
5090 Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *class_getSuperclass";
5091 Preamble += "(struct objc_class *);\n";
5092 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_getMetaClass";
5093 Preamble += "(const char *);\n";
5094 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_throw(struct objc_object *);\n";
5095 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_try_enter(void *);\n";
5096 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_try_exit(void *);\n";
5097 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_exception_extract(void *);\n";
5098 Preamble += "__OBJC_RW_DLLIMPORT int objc_exception_match";
5099 Preamble += "(struct objc_class *, struct objc_object *);\n";
5101 Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_enter(struct objc_object *);\n";
5102 Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_exit(struct objc_object *);\n";
5103 Preamble += "__OBJC_RW_DLLIMPORT Protocol *objc_getProtocol(const char *);\n";
5104 Preamble += "#ifndef __FASTENUMERATIONSTATE\n";
5105 Preamble += "struct __objcFastEnumerationState {\n\t";
5106 Preamble += "unsigned long state;\n\t";
5107 Preamble += "void **itemsPtr;\n\t";
5108 Preamble += "unsigned long *mutationsPtr;\n\t";
5109 Preamble += "unsigned long extra[5];\n};\n";
5110 Preamble += "__OBJC_RW_DLLIMPORT void objc_enumerationMutation(struct objc_object *);\n";
5111 Preamble += "#define __FASTENUMERATIONSTATE\n";
5112 Preamble += "#endif\n";
5113 Preamble += "#ifndef __NSCONSTANTSTRINGIMPL\n";
5114 Preamble += "struct __NSConstantStringImpl {\n";
5115 Preamble += " int *isa;\n";
5116 Preamble += " int flags;\n";
5117 Preamble += " char *str;\n";
5118 Preamble += " long length;\n";
5119 Preamble += "};\n";
5120 Preamble += "#ifdef CF_EXPORT_CONSTANT_STRING\n";
5121 Preamble += "extern \"C\" __declspec(dllexport) int __CFConstantStringClassReference[];\n";
5122 Preamble += "#else\n";
5123 Preamble += "__OBJC_RW_DLLIMPORT int __CFConstantStringClassReference[];\n";
5124 Preamble += "#endif\n";
5125 Preamble += "#define __NSCONSTANTSTRINGIMPL\n";
5126 Preamble += "#endif\n";
5128 Preamble += "#ifndef BLOCK_IMPL\n";
5129 Preamble += "#define BLOCK_IMPL\n";
5130 Preamble += "struct __block_impl {\n";
5131 Preamble += " void *isa;\n";
5132 Preamble += " int Flags;\n";
5133 Preamble += " int Reserved;\n";
5134 Preamble += " void *FuncPtr;\n";
5135 Preamble += "};\n";
5136 Preamble += "// Runtime copy/destroy helper functions (from Block_private.h)\n";
5137 Preamble += "#ifdef __OBJC_EXPORT_BLOCKS\n";
5138 Preamble += "extern \"C\" __declspec(dllexport) "
5140 Preamble += "extern \"C\" __declspec(dllexport) void _Block_object_dispose(const void *, const int);\n";
5141 Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteGlobalBlock[32];\n";
5142 Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteStackBlock[32];\n";
5143 Preamble += "#else\n";
5144 Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_assign(void *, const void *, const int);\n";
5145 Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_dispose(const void *, const int);\n";
5146 Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteGlobalBlock[32];\n";
5147 Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteStackBlock[32];\n";
5148 Preamble += "#endif\n";
5149 Preamble += "#endif\n";
5151 Preamble += "#undef __OBJC_RW_DLLIMPORT\n";
5152 Preamble += "#undef __OBJC_RW_STATICIMPORT\n";
5153 Preamble += "#ifndef KEEP_ATTRIBUTES\n"; // We use this for clang tests.
5154 Preamble += "#define __attribute__(X)\n";
5155 Preamble += "#endif\n";
5156 Preamble += "#define __weak\n";
5159 Preamble += "#define __block\n";
5160 Preamble += "#define __weak\n";
5164 Preamble += "\n#define __OFFSETOFIVAR__(TYPE, MEMBER) ((long long) &((TYPE *)0)->MEMBER)\n";