Lines Matching defs:Preamble
76 std::string Preamble;
2501 Preamble += "static __NSConstantStringImpl " + S;
2502 Preamble += " __attribute__ ((section (\"__DATA, __cfstring\"))) = {__CFConstantStringClassReference,";
2503 Preamble += "0x000007c8,"; // utf8_str
2508 Preamble += prettyBufS;
2509 Preamble += ",";
2510 Preamble += utostr(Exp->getString()->getByteLength()) + "};\n";
4892 RewriteObjCProtocolMetaData(ProtDecl, "", "", Preamble);
4894 InsertText(SM->getLocForStartOfFile(MainFileID), Preamble, false);
4925 Preamble = "#pragma once\n";
4926 Preamble += "struct objc_selector; struct objc_class;\n";
4927 Preamble += "struct __rw_objc_super { struct objc_object *object; ";
4928 Preamble += "struct objc_object *superClass; ";
4931 Preamble += "__rw_objc_super(struct objc_object *o, struct objc_object *s) "
4933 Preamble += "object(o), superClass(s) {} ";
4935 Preamble += "};\n";
4936 Preamble += "#ifndef _REWRITER_typedef_Protocol\n";
4937 Preamble += "typedef struct objc_object Protocol;\n";
4938 Preamble += "#define _REWRITER_typedef_Protocol\n";
4939 Preamble += "#endif\n";
4941 Preamble += "#define __OBJC_RW_DLLIMPORT extern \"C\" __declspec(dllimport)\n";
4942 Preamble += "#define __OBJC_RW_STATICIMPORT extern \"C\"\n";
4944 Preamble += "#define __OBJC_RW_DLLIMPORT extern\n";
4945 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_msgSend";
4946 Preamble += "(struct objc_object *, struct objc_selector *, ...);\n";
4947 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_msgSendSuper";
4948 Preamble += "(struct objc_super *, struct objc_selector *, ...);\n";
4949 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object* objc_msgSend_stret";
4950 Preamble += "(struct objc_object *, struct objc_selector *, ...);\n";
4951 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object* objc_msgSendSuper_stret";
4952 Preamble += "(struct objc_super *, struct objc_selector *, ...);\n";
4953 Preamble += "__OBJC_RW_DLLIMPORT double objc_msgSend_fpret";
4954 Preamble += "(struct objc_object *, struct objc_selector *, ...);\n";
4955 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_getClass";
4956 Preamble += "(const char *);\n";
4957 Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *class_getSuperclass";
4958 Preamble += "(struct objc_class *);\n";
4959 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_getMetaClass";
4960 Preamble += "(const char *);\n";
4961 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_throw(struct objc_object *);\n";
4962 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_try_enter(void *);\n";
4963 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_try_exit(void *);\n";
4964 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_exception_extract(void *);\n";
4965 Preamble += "__OBJC_RW_DLLIMPORT int objc_exception_match";
4966 Preamble += "(struct objc_class *, struct objc_object *);\n";
4968 Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_enter(struct objc_object *);\n";
4969 Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_exit(struct objc_object *);\n";
4970 Preamble += "__OBJC_RW_DLLIMPORT Protocol *objc_getProtocol(const char *);\n";
4971 Preamble += "#ifndef __FASTENUMERATIONSTATE\n";
4972 Preamble += "struct __objcFastEnumerationState {\n\t";
4973 Preamble += "unsigned long state;\n\t";
4974 Preamble += "void **itemsPtr;\n\t";
4975 Preamble += "unsigned long *mutationsPtr;\n\t";
4976 Preamble += "unsigned long extra[5];\n};\n";
4977 Preamble += "__OBJC_RW_DLLIMPORT void objc_enumerationMutation(struct objc_object *);\n";
4978 Preamble += "#define __FASTENUMERATIONSTATE\n";
4979 Preamble += "#endif\n";
4980 Preamble += "#ifndef __NSCONSTANTSTRINGIMPL\n";
4981 Preamble += "struct __NSConstantStringImpl {\n";
4982 Preamble += " int *isa;\n";
4983 Preamble += " int flags;\n";
4984 Preamble += " char *str;\n";
4985 Preamble += " long length;\n";
4986 Preamble += "};\n";
4987 Preamble += "#ifdef CF_EXPORT_CONSTANT_STRING\n";
4988 Preamble += "extern \"C\" __declspec(dllexport) int __CFConstantStringClassReference[];\n";
4989 Preamble += "#else\n";
4990 Preamble += "__OBJC_RW_DLLIMPORT int __CFConstantStringClassReference[];\n";
4991 Preamble += "#endif\n";
4992 Preamble += "#define __NSCONSTANTSTRINGIMPL\n";
4993 Preamble += "#endif\n";
4995 Preamble += "#ifndef BLOCK_IMPL\n";
4996 Preamble += "#define BLOCK_IMPL\n";
4997 Preamble += "struct __block_impl {\n";
4998 Preamble += " void *isa;\n";
4999 Preamble += " int Flags;\n";
5000 Preamble += " int Reserved;\n";
5001 Preamble += " void *FuncPtr;\n";
5002 Preamble += "};\n";
5003 Preamble += "// Runtime copy/destroy helper functions (from Block_private.h)\n";
5004 Preamble += "#ifdef __OBJC_EXPORT_BLOCKS\n";
5005 Preamble += "extern \"C\" __declspec(dllexport) "
5007 Preamble += "extern \"C\" __declspec(dllexport) void _Block_object_dispose(const void *, const int);\n";
5008 Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteGlobalBlock[32];\n";
5009 Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteStackBlock[32];\n";
5010 Preamble += "#else\n";
5011 Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_assign(void *, const void *, const int);\n";
5012 Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_dispose(const void *, const int);\n";
5013 Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteGlobalBlock[32];\n";
5014 Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteStackBlock[32];\n";
5015 Preamble += "#endif\n";
5016 Preamble += "#endif\n";
5018 Preamble += "#undef __OBJC_RW_DLLIMPORT\n";
5019 Preamble += "#undef __OBJC_RW_STATICIMPORT\n";
5020 Preamble += "#ifndef KEEP_ATTRIBUTES\n"; // We use this for clang tests.
5021 Preamble += "#define __attribute__(X)\n";
5022 Preamble += "#endif\n";
5023 Preamble += "#define __weak\n";
5026 Preamble += "#define __block\n";
5027 Preamble += "#define __weak\n";
5031 Preamble += "\n#define __OFFSETOFIVAR__(TYPE, MEMBER) ((long long) &((TYPE *)0)->MEMBER)\n";