Lines Matching refs:Preamble
75 std::string Preamble; member in __anon6e6e6bfc0111::RewriteObjC
2494 Preamble += "static __NSConstantStringImpl " + S; in RewriteObjCStringLiteral()
2495 …Preamble += " __attribute__ ((section (\"__DATA, __cfstring\"))) = {__CFConstantStringClassReferen… in RewriteObjCStringLiteral()
2496 Preamble += "0x000007c8,"; // utf8_str in RewriteObjCStringLiteral()
2501 Preamble += prettyBuf.str(); in RewriteObjCStringLiteral()
2502 Preamble += ","; in RewriteObjCStringLiteral()
2503 Preamble += utostr(Exp->getString()->getByteLength()) + "};\n"; in RewriteObjCStringLiteral()
4915 RewriteObjCProtocolMetaData(ProtDecl, "", "", Preamble); in HandleTranslationUnit()
4917 InsertText(SM->getLocForStartOfFile(MainFileID), Preamble, false); in HandleTranslationUnit()
4948 Preamble = "#pragma once\n"; in Initialize()
4949 Preamble += "struct objc_selector; struct objc_class;\n"; in Initialize()
4950 Preamble += "struct __rw_objc_super { struct objc_object *object; "; in Initialize()
4951 Preamble += "struct objc_object *superClass; "; in Initialize()
4954 Preamble += "__rw_objc_super(struct objc_object *o, struct objc_object *s) " in Initialize()
4956 Preamble += "object(o), superClass(s) {} "; in Initialize()
4958 Preamble += "};\n"; in Initialize()
4959 Preamble += "#ifndef _REWRITER_typedef_Protocol\n"; in Initialize()
4960 Preamble += "typedef struct objc_object Protocol;\n"; in Initialize()
4961 Preamble += "#define _REWRITER_typedef_Protocol\n"; in Initialize()
4962 Preamble += "#endif\n"; in Initialize()
4964 Preamble += "#define __OBJC_RW_DLLIMPORT extern \"C\" __declspec(dllimport)\n"; in Initialize()
4965 Preamble += "#define __OBJC_RW_STATICIMPORT extern \"C\"\n"; in Initialize()
4967 Preamble += "#define __OBJC_RW_DLLIMPORT extern\n"; in Initialize()
4968 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_msgSend"; in Initialize()
4969 Preamble += "(struct objc_object *, struct objc_selector *, ...);\n"; in Initialize()
4970 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_msgSendSuper"; in Initialize()
4971 Preamble += "(struct objc_super *, struct objc_selector *, ...);\n"; in Initialize()
4972 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object* objc_msgSend_stret"; in Initialize()
4973 Preamble += "(struct objc_object *, struct objc_selector *, ...);\n"; in Initialize()
4974 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object* objc_msgSendSuper_stret"; in Initialize()
4975 Preamble += "(struct objc_super *, struct objc_selector *, ...);\n"; in Initialize()
4976 Preamble += "__OBJC_RW_DLLIMPORT double objc_msgSend_fpret"; in Initialize()
4977 Preamble += "(struct objc_object *, struct objc_selector *, ...);\n"; in Initialize()
4978 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_getClass"; in Initialize()
4979 Preamble += "(const char *);\n"; in Initialize()
4980 Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *class_getSuperclass"; in Initialize()
4981 Preamble += "(struct objc_class *);\n"; in Initialize()
4982 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_getMetaClass"; in Initialize()
4983 Preamble += "(const char *);\n"; in Initialize()
4984 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_throw(struct objc_object *);\n"; in Initialize()
4985 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_try_enter(void *);\n"; in Initialize()
4986 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_try_exit(void *);\n"; in Initialize()
4987 Preamble += "__OBJC_RW_DLLIMPORT struct objc_object *objc_exception_extract(void *);\n"; in Initialize()
4988 Preamble += "__OBJC_RW_DLLIMPORT int objc_exception_match"; in Initialize()
4989 Preamble += "(struct objc_class *, struct objc_object *);\n"; in Initialize()
4991 Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_enter(struct objc_object *);\n"; in Initialize()
4992 Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_exit(struct objc_object *);\n"; in Initialize()
4993 Preamble += "__OBJC_RW_DLLIMPORT Protocol *objc_getProtocol(const char *);\n"; in Initialize()
4994 Preamble += "#ifndef __FASTENUMERATIONSTATE\n"; in Initialize()
4995 Preamble += "struct __objcFastEnumerationState {\n\t"; in Initialize()
4996 Preamble += "unsigned long state;\n\t"; in Initialize()
4997 Preamble += "void **itemsPtr;\n\t"; in Initialize()
4998 Preamble += "unsigned long *mutationsPtr;\n\t"; in Initialize()
4999 Preamble += "unsigned long extra[5];\n};\n"; in Initialize()
5000 Preamble += "__OBJC_RW_DLLIMPORT void objc_enumerationMutation(struct objc_object *);\n"; in Initialize()
5001 Preamble += "#define __FASTENUMERATIONSTATE\n"; in Initialize()
5002 Preamble += "#endif\n"; in Initialize()
5003 Preamble += "#ifndef __NSCONSTANTSTRINGIMPL\n"; in Initialize()
5004 Preamble += "struct __NSConstantStringImpl {\n"; in Initialize()
5005 Preamble += " int *isa;\n"; in Initialize()
5006 Preamble += " int flags;\n"; in Initialize()
5007 Preamble += " char *str;\n"; in Initialize()
5008 Preamble += " long length;\n"; in Initialize()
5009 Preamble += "};\n"; in Initialize()
5010 Preamble += "#ifdef CF_EXPORT_CONSTANT_STRING\n"; in Initialize()
5011 Preamble += "extern \"C\" __declspec(dllexport) int __CFConstantStringClassReference[];\n"; in Initialize()
5012 Preamble += "#else\n"; in Initialize()
5013 Preamble += "__OBJC_RW_DLLIMPORT int __CFConstantStringClassReference[];\n"; in Initialize()
5014 Preamble += "#endif\n"; in Initialize()
5015 Preamble += "#define __NSCONSTANTSTRINGIMPL\n"; in Initialize()
5016 Preamble += "#endif\n"; in Initialize()
5018 Preamble += "#ifndef BLOCK_IMPL\n"; in Initialize()
5019 Preamble += "#define BLOCK_IMPL\n"; in Initialize()
5020 Preamble += "struct __block_impl {\n"; in Initialize()
5021 Preamble += " void *isa;\n"; in Initialize()
5022 Preamble += " int Flags;\n"; in Initialize()
5023 Preamble += " int Reserved;\n"; in Initialize()
5024 Preamble += " void *FuncPtr;\n"; in Initialize()
5025 Preamble += "};\n"; in Initialize()
5026 Preamble += "// Runtime copy/destroy helper functions (from Block_private.h)\n"; in Initialize()
5027 Preamble += "#ifdef __OBJC_EXPORT_BLOCKS\n"; in Initialize()
5028 Preamble += "extern \"C\" __declspec(dllexport) " in Initialize()
5030 …Preamble += "extern \"C\" __declspec(dllexport) void _Block_object_dispose(const void *, const int… in Initialize()
5031 Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteGlobalBlock[32];\n"; in Initialize()
5032 Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteStackBlock[32];\n"; in Initialize()
5033 Preamble += "#else\n"; in Initialize()
5034 Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_assign(void *, const void *, const int);\n"; in Initialize()
5035 Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_dispose(const void *, const int);\n"; in Initialize()
5036 Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteGlobalBlock[32];\n"; in Initialize()
5037 Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteStackBlock[32];\n"; in Initialize()
5038 Preamble += "#endif\n"; in Initialize()
5039 Preamble += "#endif\n"; in Initialize()
5041 Preamble += "#undef __OBJC_RW_DLLIMPORT\n"; in Initialize()
5042 Preamble += "#undef __OBJC_RW_STATICIMPORT\n"; in Initialize()
5043 Preamble += "#ifndef KEEP_ATTRIBUTES\n"; // We use this for clang tests. in Initialize()
5044 Preamble += "#define __attribute__(X)\n"; in Initialize()
5045 Preamble += "#endif\n"; in Initialize()
5046 Preamble += "#define __weak\n"; in Initialize()
5049 Preamble += "#define __block\n"; in Initialize()
5050 Preamble += "#define __weak\n"; in Initialize()
5054 Preamble += "\n#define __OFFSETOFIVAR__(TYPE, MEMBER) ((long long) &((TYPE *)0)->MEMBER)\n"; in Initialize()