Lines Matching refs:Preamble
76 std::string Preamble; member in __anoneeab31c10111::RewriteModernObjC
2570 Preamble += "static __NSConstantStringImpl " + S; in RewriteObjCStringLiteral()
2571 …Preamble += " __attribute__ ((section (\"__DATA, __cfstring\"))) = {__CFConstantStringClassReferen… in RewriteObjCStringLiteral()
2572 Preamble += "0x000007c8,"; // utf8_str in RewriteObjCStringLiteral()
2577 Preamble += prettyBuf.str(); in RewriteObjCStringLiteral()
2578 Preamble += ","; in RewriteObjCStringLiteral()
2579 Preamble += utostr(Exp->getString()->getByteLength()) + "};\n"; in RewriteObjCStringLiteral()
5085 Preamble += HF; in RewriteByRefVar()
5853 RewriteObjCProtocolMetaData(ProtDecl, Preamble); in HandleTranslationUnit()
5854 Write_ProtocolExprReferencedMetadata(Context, ProtDecl, Preamble); in HandleTranslationUnit()
5857 InsertText(SM->getLocForStartOfFile(MainFileID), Preamble, false); in HandleTranslationUnit()
5901 Preamble += "#ifndef __OBJC2__\n"; in Initialize()
5902 Preamble += "#define __OBJC2__\n"; in Initialize()
5903 Preamble += "#endif\n"; in Initialize()
5908 Preamble = "#pragma once\n"; in Initialize()
5909 Preamble += "struct objc_selector; struct objc_class;\n"; in Initialize()
5910 Preamble += "struct __rw_objc_super { \n\tstruct objc_object *object; "; in Initialize()
5911 Preamble += "\n\tstruct objc_object *superClass; "; in Initialize()
5913 Preamble += "\n\t__rw_objc_super(struct objc_object *o, struct objc_object *s) "; in Initialize()
5914 Preamble += ": object(o), superClass(s) {} "; in Initialize()
5915 Preamble += "\n};\n"; in Initialize()
5920 Preamble += "\n#pragma section(\".objc_classlist$B\", long, read, write)\n"; in Initialize()
5921 Preamble += "#pragma section(\".objc_catlist$B\", long, read, write)\n"; in Initialize()
5922 Preamble += "#pragma section(\".objc_imageinfo$B\", long, read, write)\n"; in Initialize()
5923 Preamble += "#pragma section(\".objc_nlclslist$B\", long, read, write)\n"; in Initialize()
5924 Preamble += "#pragma section(\".objc_nlcatlist$B\", long, read, write)\n"; in Initialize()
5926 Preamble += "#pragma section(\".cat_cls_meth$B\", long, read, write)\n"; in Initialize()
5927 Preamble += "#pragma section(\".inst_meth$B\", long, read, write)\n"; in Initialize()
5928 Preamble += "#pragma section(\".cls_meth$B\", long, read, write)\n"; in Initialize()
5929 Preamble += "#pragma section(\".objc_ivar$B\", long, read, write)\n"; in Initialize()
5933 Preamble += "#pragma section(\".objc_selrefs$B\", long, read, write)\n"; in Initialize()
5934 Preamble += "#pragma section(\".objc_classrefs$B\", long, read, write)\n"; in Initialize()
5935 Preamble += "#pragma section(\".objc_superrefs$B\", long, read, write)\n"; in Initialize()
5938 Preamble += "#ifndef _REWRITER_typedef_Protocol\n"; in Initialize()
5939 Preamble += "typedef struct objc_object Protocol;\n"; in Initialize()
5940 Preamble += "#define _REWRITER_typedef_Protocol\n"; in Initialize()
5941 Preamble += "#endif\n"; in Initialize()
5943 Preamble += "#define __OBJC_RW_DLLIMPORT extern \"C\" __declspec(dllimport)\n"; in Initialize()
5944 Preamble += "#define __OBJC_RW_STATICIMPORT extern \"C\"\n"; in Initialize()
5947 Preamble += "#define __OBJC_RW_DLLIMPORT extern\n"; in Initialize()
5949 Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSend(void);\n"; in Initialize()
5950 Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSendSuper(void);\n"; in Initialize()
5951 Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSend_stret(void);\n"; in Initialize()
5952 Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSendSuper_stret(void);\n"; in Initialize()
5953 Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSend_fpret(void);\n"; in Initialize()
5955 Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *objc_getClass"; in Initialize()
5956 Preamble += "(const char *);\n"; in Initialize()
5957 Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *class_getSuperclass"; in Initialize()
5958 Preamble += "(struct objc_class *);\n"; in Initialize()
5959 Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *objc_getMetaClass"; in Initialize()
5960 Preamble += "(const char *);\n"; in Initialize()
5961 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_throw( struct objc_object *);\n"; in Initialize()
5963 Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_enter( struct objc_object *);\n"; in Initialize()
5964 Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_exit( struct objc_object *);\n"; in Initialize()
5965 Preamble += "__OBJC_RW_DLLIMPORT Protocol *objc_getProtocol(const char *);\n"; in Initialize()
5966 Preamble += "#ifdef _WIN64\n"; in Initialize()
5967 Preamble += "typedef unsigned long long _WIN_NSUInteger;\n"; in Initialize()
5968 Preamble += "#else\n"; in Initialize()
5969 Preamble += "typedef unsigned int _WIN_NSUInteger;\n"; in Initialize()
5970 Preamble += "#endif\n"; in Initialize()
5971 Preamble += "#ifndef __FASTENUMERATIONSTATE\n"; in Initialize()
5972 Preamble += "struct __objcFastEnumerationState {\n\t"; in Initialize()
5973 Preamble += "unsigned long state;\n\t"; in Initialize()
5974 Preamble += "void **itemsPtr;\n\t"; in Initialize()
5975 Preamble += "unsigned long *mutationsPtr;\n\t"; in Initialize()
5976 Preamble += "unsigned long extra[5];\n};\n"; in Initialize()
5977 Preamble += "__OBJC_RW_DLLIMPORT void objc_enumerationMutation(struct objc_object *);\n"; in Initialize()
5978 Preamble += "#define __FASTENUMERATIONSTATE\n"; in Initialize()
5979 Preamble += "#endif\n"; in Initialize()
5980 Preamble += "#ifndef __NSCONSTANTSTRINGIMPL\n"; in Initialize()
5981 Preamble += "struct __NSConstantStringImpl {\n"; in Initialize()
5982 Preamble += " int *isa;\n"; in Initialize()
5983 Preamble += " int flags;\n"; in Initialize()
5984 Preamble += " char *str;\n"; in Initialize()
5985 Preamble += "#if _WIN64\n"; in Initialize()
5986 Preamble += " long long length;\n"; in Initialize()
5987 Preamble += "#else\n"; in Initialize()
5988 Preamble += " long length;\n"; in Initialize()
5989 Preamble += "#endif\n"; in Initialize()
5990 Preamble += "};\n"; in Initialize()
5991 Preamble += "#ifdef CF_EXPORT_CONSTANT_STRING\n"; in Initialize()
5992 Preamble += "extern \"C\" __declspec(dllexport) int __CFConstantStringClassReference[];\n"; in Initialize()
5993 Preamble += "#else\n"; in Initialize()
5994 Preamble += "__OBJC_RW_DLLIMPORT int __CFConstantStringClassReference[];\n"; in Initialize()
5995 Preamble += "#endif\n"; in Initialize()
5996 Preamble += "#define __NSCONSTANTSTRINGIMPL\n"; in Initialize()
5997 Preamble += "#endif\n"; in Initialize()
5999 Preamble += "#ifndef BLOCK_IMPL\n"; in Initialize()
6000 Preamble += "#define BLOCK_IMPL\n"; in Initialize()
6001 Preamble += "struct __block_impl {\n"; in Initialize()
6002 Preamble += " void *isa;\n"; in Initialize()
6003 Preamble += " int Flags;\n"; in Initialize()
6004 Preamble += " int Reserved;\n"; in Initialize()
6005 Preamble += " void *FuncPtr;\n"; in Initialize()
6006 Preamble += "};\n"; in Initialize()
6007 Preamble += "// Runtime copy/destroy helper functions (from Block_private.h)\n"; in Initialize()
6008 Preamble += "#ifdef __OBJC_EXPORT_BLOCKS\n"; in Initialize()
6009 Preamble += "extern \"C\" __declspec(dllexport) " in Initialize()
6011 …Preamble += "extern \"C\" __declspec(dllexport) void _Block_object_dispose(const void *, const int… in Initialize()
6012 Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteGlobalBlock[32];\n"; in Initialize()
6013 Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteStackBlock[32];\n"; in Initialize()
6014 Preamble += "#else\n"; in Initialize()
6015 Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_assign(void *, const void *, const int);\n"; in Initialize()
6016 Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_dispose(const void *, const int);\n"; in Initialize()
6017 Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteGlobalBlock[32];\n"; in Initialize()
6018 Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteStackBlock[32];\n"; in Initialize()
6019 Preamble += "#endif\n"; in Initialize()
6020 Preamble += "#endif\n"; in Initialize()
6022 Preamble += "#undef __OBJC_RW_DLLIMPORT\n"; in Initialize()
6023 Preamble += "#undef __OBJC_RW_STATICIMPORT\n"; in Initialize()
6024 Preamble += "#ifndef KEEP_ATTRIBUTES\n"; // We use this for clang tests. in Initialize()
6025 Preamble += "#define __attribute__(X)\n"; in Initialize()
6026 Preamble += "#endif\n"; in Initialize()
6027 Preamble += "#ifndef __weak\n"; in Initialize()
6028 Preamble += "#define __weak\n"; in Initialize()
6029 Preamble += "#endif\n"; in Initialize()
6030 Preamble += "#ifndef __block\n"; in Initialize()
6031 Preamble += "#define __block\n"; in Initialize()
6032 Preamble += "#endif\n"; in Initialize()
6035 Preamble += "#define __block\n"; in Initialize()
6036 Preamble += "#define __weak\n"; in Initialize()
6040 Preamble += "\n#include <stdarg.h>\n"; in Initialize()
6041 Preamble += "struct __NSContainer_literal {\n"; in Initialize()
6042 Preamble += " void * *arr;\n"; in Initialize()
6043 Preamble += " __NSContainer_literal (unsigned int count, ...) {\n"; in Initialize()
6044 Preamble += "\tva_list marker;\n"; in Initialize()
6045 Preamble += "\tva_start(marker, count);\n"; in Initialize()
6046 Preamble += "\tarr = new void *[count];\n"; in Initialize()
6047 Preamble += "\tfor (unsigned i = 0; i < count; i++)\n"; in Initialize()
6048 Preamble += "\t arr[i] = va_arg(marker, void *);\n"; in Initialize()
6049 Preamble += "\tva_end( marker );\n"; in Initialize()
6050 Preamble += " };\n"; in Initialize()
6051 Preamble += " ~__NSContainer_literal() {\n"; in Initialize()
6052 Preamble += "\tdelete[] arr;\n"; in Initialize()
6053 Preamble += " }\n"; in Initialize()
6054 Preamble += "};\n"; in Initialize()
6057 Preamble += "extern \"C\" __declspec(dllimport) void * objc_autoreleasePoolPush(void);\n"; in Initialize()
6058 Preamble += "extern \"C\" __declspec(dllimport) void objc_autoreleasePoolPop(void *);\n\n"; in Initialize()
6059 Preamble += "struct __AtAutoreleasePool {\n"; in Initialize()
6060 Preamble += " __AtAutoreleasePool() {atautoreleasepoolobj = objc_autoreleasePoolPush();}\n"; in Initialize()
6061 Preamble += " ~__AtAutoreleasePool() {objc_autoreleasePoolPop(atautoreleasepoolobj);}\n"; in Initialize()
6062 Preamble += " void * atautoreleasepoolobj;\n"; in Initialize()
6063 Preamble += "};\n"; in Initialize()
6067 Preamble += "\n#define __OFFSETOFIVAR__(TYPE, MEMBER) ((long long) &((TYPE *)0)->MEMBER)\n"; in Initialize()