Home | History | Annotate | Download | only in Frontend

Lines Matching refs:Preamble

74     std::string Preamble;
2507 Preamble += "static __NSConstantStringImpl " + S;
2508 Preamble += " __attribute__ ((section (\"__DATA, __cfstring\"))) = {__CFConstantStringClassReference,";
2509 Preamble += "0x000007c8,"; // utf8_str
2514 Preamble += prettyBuf.str();
2515 Preamble += ",";
2516 Preamble += utostr(Exp->getString()->getByteLength()) + "};\n";
4970 RewriteObjCProtocolMetaData(*I, "", "", Preamble);
4972 InsertText(SM->getLocForStartOfFile(MainFileID), Preamble, false);
5003 Preamble = "#pragma once\n";
5004 Preamble += "struct objc_selector; struct objc_class;\n";
5005 Preamble += "struct __rw_objc_super { struct objc_object *object; ";
5006 Preamble += "struct objc_object *superClass; ";
5009 Preamble += "__rw_objc_super(struct objc_object *o, struct objc_object *s) "
5011 Preamble += "object(o), superClass(s) {} ";
5013 Preamble += "};\n";
5014 Preamble += "#ifndef _REWRITER_typedef_Protocol\n";
5015 Preamble += "typedef struct objc_object Protocol;\n";
5016 Preamble += "#define _REWRITER_typedef_Protocol\n";
5017 Preamble += "#endif\n";
5019 Preamble += "#define __OBJC_RW_DLLIMPORT extern \"C\" __declspec(dllimport)\n";
5020 Preamble += "#define __OBJC_RW_STATICIMPORT extern \"C\"\n";
5022 Preamble += "#define __OBJC_RW_DLLIMPORT extern\n";
5023 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_msgSend";
5024 Preamble += "(struct objc_object *, struct objc_selector *, ...);\n";
5025 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_msgSendSuper";
5026 Preamble += "(struct objc_super *, struct objc_selector *, ...);\n";
5027 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object* objc_msgSend_stret";
5028 Preamble += "(struct objc_object *, struct objc_selector *, ...);\n";
5029 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object* objc_msgSendSuper_stret";
5030 Preamble += "(struct objc_super *, struct objc_selector *, ...);\n";
5031 Preamble += "__OBJC_RW_DLLIMPORT double objc_msgSend_fpret";
5032 Preamble += "(struct objc_object *, struct objc_selector *, ...);\n";
5033 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_getClass";
5034 Preamble += "(const char *);\n";
5035 Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *class_getSuperclass";
5036 Preamble += "(struct objc_class *);\n";
5037 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_getMetaClass";
5038 Preamble += "(const char *);\n";
5039 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_throw(struct objc_object *);\n";
5040 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_try_enter(void *);\n";
5041 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_try_exit(void *);\n";
5042 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_exception_extract(void *);\n";
5043 Preamble += "__OBJC_RW_DLLIMPORT int objc_exception_match";
5044 Preamble += "(struct objc_class *, struct objc_object *);\n";
5046 Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_enter(struct objc_object *);\n";
5047 Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_exit(struct objc_object *);\n";
5048 Preamble += "__OBJC_RW_DLLIMPORT Protocol *objc_getProtocol(const char *);\n";
5049 Preamble += "#ifndef __FASTENUMERATIONSTATE\n";
5050 Preamble += "struct __objcFastEnumerationState {\n\t";
5051 Preamble += "unsigned long state;\n\t";
5052 Preamble += "void **itemsPtr;\n\t";
5053 Preamble += "unsigned long *mutationsPtr;\n\t";
5054 Preamble += "unsigned long extra[5];\n};\n";
5055 Preamble += "__OBJC_RW_DLLIMPORT void objc_enumerationMutation(struct objc_object *);\n";
5056 Preamble += "#define __FASTENUMERATIONSTATE\n";
5057 Preamble += "#endif\n";
5058 Preamble += "#ifndef __NSCONSTANTSTRINGIMPL\n";
5059 Preamble += "struct __NSConstantStringImpl {\n";
5060 Preamble += " int *isa;\n";
5061 Preamble += " int flags;\n";
5062 Preamble += " char *str;\n";
5063 Preamble += " long length;\n";
5064 Preamble += "};\n";
5065 Preamble += "#ifdef CF_EXPORT_CONSTANT_STRING\n";
5066 Preamble += "extern \"C\" __declspec(dllexport) int __CFConstantStringClassReference[];\n";
5067 Preamble += "#else\n";
5068 Preamble += "__OBJC_RW_DLLIMPORT int __CFConstantStringClassReference[];\n";
5069 Preamble += "#endif\n";
5070 Preamble += "#define __NSCONSTANTSTRINGIMPL\n";
5071 Preamble += "#endif\n";
5072 // Blocks preamble.
5073 Preamble += "#ifndef BLOCK_IMPL\n";
5074 Preamble += "#define BLOCK_IMPL\n";
5075 Preamble += "struct __block_impl {\n";
5076 Preamble += " void *isa;\n";
5077 Preamble += " int Flags;\n";
5078 Preamble += " int Reserved;\n";
5079 Preamble += " void *FuncPtr;\n";
5080 Preamble += "};\n";
5081 Preamble += "// Runtime copy/destroy helper functions (from Block_private.h)\n";
5082 Preamble += "#ifdef __OBJC_EXPORT_BLOCKS\n";
5083 Preamble += "extern \"C\" __declspec(dllexport) "
5085 Preamble += "extern \"C\" __declspec(dllexport) void _Block_object_dispose(const void *, const int);\n";
5086 Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteGlobalBlock[32];\n";
5087 Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteStackBlock[32];\n";
5088 Preamble += "#else\n";
5089 Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_assign(void *, const void *, const int);\n";
5090 Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_dispose(const void *, const int);\n";
5091 Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteGlobalBlock[32];\n";
5092 Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteStackBlock[32];\n";
5093 Preamble += "#endif\n";
5094 Preamble += "#endif\n";
5096 Preamble += "#undef __OBJC_RW_DLLIMPORT\n";
5097 Preamble += "#undef __OBJC_RW_STATICIMPORT\n";
5098 Preamble += "#ifndef KEEP_ATTRIBUTES\n"; // We use this for clang tests.
5099 Preamble += "#define __attribute__(X)\n";
5100 Preamble += "#endif\n";
5101 Preamble += "#define __weak\n";
5104 Preamble += "#define __block\n";
5105 Preamble += "#define __weak\n";
5109 Preamble += "\n#define __OFFSETOFIVAR__(TYPE, MEMBER) ((long long) &((TYPE *)0)->MEMBER)\n";