• Home
  • Raw
  • Download

Lines Matching refs:Preamble

76     std::string Preamble;  member in __anonf9e3580d0111::RewriteModernObjC
2597 Preamble += "static __NSConstantStringImpl " + S; in RewriteObjCStringLiteral()
2598Preamble += " __attribute__ ((section (\"__DATA, __cfstring\"))) = {__CFConstantStringClassReferen… in RewriteObjCStringLiteral()
2599 Preamble += "0x000007c8,"; // utf8_str in RewriteObjCStringLiteral()
2604 Preamble += prettyBuf.str(); in RewriteObjCStringLiteral()
2605 Preamble += ","; in RewriteObjCStringLiteral()
2606 Preamble += utostr(Exp->getString()->getByteLength()) + "};\n"; in RewriteObjCStringLiteral()
5161 Preamble += HF; in RewriteByRefVar()
5931 RewriteObjCProtocolMetaData(ProtDecl, Preamble); in HandleTranslationUnit()
5932 Write_ProtocolExprReferencedMetadata(Context, ProtDecl, Preamble); in HandleTranslationUnit()
5935 InsertText(SM->getLocForStartOfFile(MainFileID), Preamble, false); in HandleTranslationUnit()
5979 Preamble += "#ifndef __OBJC2__\n"; in Initialize()
5980 Preamble += "#define __OBJC2__\n"; in Initialize()
5981 Preamble += "#endif\n"; in Initialize()
5986 Preamble = "#pragma once\n"; in Initialize()
5987 Preamble += "struct objc_selector; struct objc_class;\n"; in Initialize()
5988 Preamble += "struct __rw_objc_super { \n\tstruct objc_object *object; "; in Initialize()
5989 Preamble += "\n\tstruct objc_object *superClass; "; in Initialize()
5991 Preamble += "\n\t__rw_objc_super(struct objc_object *o, struct objc_object *s) "; in Initialize()
5992 Preamble += ": object(o), superClass(s) {} "; in Initialize()
5993 Preamble += "\n};\n"; in Initialize()
5998 Preamble += "\n#pragma section(\".objc_classlist$B\", long, read, write)\n"; in Initialize()
5999 Preamble += "#pragma section(\".objc_catlist$B\", long, read, write)\n"; in Initialize()
6000 Preamble += "#pragma section(\".objc_imageinfo$B\", long, read, write)\n"; in Initialize()
6001 Preamble += "#pragma section(\".objc_nlclslist$B\", long, read, write)\n"; in Initialize()
6002 Preamble += "#pragma section(\".objc_nlcatlist$B\", long, read, write)\n"; in Initialize()
6004 Preamble += "#pragma section(\".cat_cls_meth$B\", long, read, write)\n"; in Initialize()
6005 Preamble += "#pragma section(\".inst_meth$B\", long, read, write)\n"; in Initialize()
6006 Preamble += "#pragma section(\".cls_meth$B\", long, read, write)\n"; in Initialize()
6007 Preamble += "#pragma section(\".objc_ivar$B\", long, read, write)\n"; in Initialize()
6011 Preamble += "#pragma section(\".objc_selrefs$B\", long, read, write)\n"; in Initialize()
6012 Preamble += "#pragma section(\".objc_classrefs$B\", long, read, write)\n"; in Initialize()
6013 Preamble += "#pragma section(\".objc_superrefs$B\", long, read, write)\n"; in Initialize()
6016 Preamble += "#ifndef _REWRITER_typedef_Protocol\n"; in Initialize()
6017 Preamble += "typedef struct objc_object Protocol;\n"; in Initialize()
6018 Preamble += "#define _REWRITER_typedef_Protocol\n"; in Initialize()
6019 Preamble += "#endif\n"; in Initialize()
6021 Preamble += "#define __OBJC_RW_DLLIMPORT extern \"C\" __declspec(dllimport)\n"; in Initialize()
6022 Preamble += "#define __OBJC_RW_STATICIMPORT extern \"C\"\n"; in Initialize()
6025 Preamble += "#define __OBJC_RW_DLLIMPORT extern\n"; in Initialize()
6027 Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSend(void);\n"; in Initialize()
6028 Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSendSuper(void);\n"; in Initialize()
6029 Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSend_stret(void);\n"; in Initialize()
6030 Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSendSuper_stret(void);\n"; in Initialize()
6031 Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSend_fpret(void);\n"; in Initialize()
6033 Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *objc_getClass"; in Initialize()
6034 Preamble += "(const char *);\n"; in Initialize()
6035 Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *class_getSuperclass"; in Initialize()
6036 Preamble += "(struct objc_class *);\n"; in Initialize()
6037 Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *objc_getMetaClass"; in Initialize()
6038 Preamble += "(const char *);\n"; in Initialize()
6039 Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_throw( struct objc_object *);\n"; in Initialize()
6041 Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_enter( struct objc_object *);\n"; in Initialize()
6042 Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_exit( struct objc_object *);\n"; in Initialize()
6043 Preamble += "__OBJC_RW_DLLIMPORT Protocol *objc_getProtocol(const char *);\n"; in Initialize()
6044 Preamble += "#ifdef _WIN64\n"; in Initialize()
6045 Preamble += "typedef unsigned long long _WIN_NSUInteger;\n"; in Initialize()
6046 Preamble += "#else\n"; in Initialize()
6047 Preamble += "typedef unsigned int _WIN_NSUInteger;\n"; in Initialize()
6048 Preamble += "#endif\n"; in Initialize()
6049 Preamble += "#ifndef __FASTENUMERATIONSTATE\n"; in Initialize()
6050 Preamble += "struct __objcFastEnumerationState {\n\t"; in Initialize()
6051 Preamble += "unsigned long state;\n\t"; in Initialize()
6052 Preamble += "void **itemsPtr;\n\t"; in Initialize()
6053 Preamble += "unsigned long *mutationsPtr;\n\t"; in Initialize()
6054 Preamble += "unsigned long extra[5];\n};\n"; in Initialize()
6055 Preamble += "__OBJC_RW_DLLIMPORT void objc_enumerationMutation(struct objc_object *);\n"; in Initialize()
6056 Preamble += "#define __FASTENUMERATIONSTATE\n"; in Initialize()
6057 Preamble += "#endif\n"; in Initialize()
6058 Preamble += "#ifndef __NSCONSTANTSTRINGIMPL\n"; in Initialize()
6059 Preamble += "struct __NSConstantStringImpl {\n"; in Initialize()
6060 Preamble += " int *isa;\n"; in Initialize()
6061 Preamble += " int flags;\n"; in Initialize()
6062 Preamble += " char *str;\n"; in Initialize()
6063 Preamble += "#if _WIN64\n"; in Initialize()
6064 Preamble += " long long length;\n"; in Initialize()
6065 Preamble += "#else\n"; in Initialize()
6066 Preamble += " long length;\n"; in Initialize()
6067 Preamble += "#endif\n"; in Initialize()
6068 Preamble += "};\n"; in Initialize()
6069 Preamble += "#ifdef CF_EXPORT_CONSTANT_STRING\n"; in Initialize()
6070 Preamble += "extern \"C\" __declspec(dllexport) int __CFConstantStringClassReference[];\n"; in Initialize()
6071 Preamble += "#else\n"; in Initialize()
6072 Preamble += "__OBJC_RW_DLLIMPORT int __CFConstantStringClassReference[];\n"; in Initialize()
6073 Preamble += "#endif\n"; in Initialize()
6074 Preamble += "#define __NSCONSTANTSTRINGIMPL\n"; in Initialize()
6075 Preamble += "#endif\n"; in Initialize()
6077 Preamble += "#ifndef BLOCK_IMPL\n"; in Initialize()
6078 Preamble += "#define BLOCK_IMPL\n"; in Initialize()
6079 Preamble += "struct __block_impl {\n"; in Initialize()
6080 Preamble += " void *isa;\n"; in Initialize()
6081 Preamble += " int Flags;\n"; in Initialize()
6082 Preamble += " int Reserved;\n"; in Initialize()
6083 Preamble += " void *FuncPtr;\n"; in Initialize()
6084 Preamble += "};\n"; in Initialize()
6085 Preamble += "// Runtime copy/destroy helper functions (from Block_private.h)\n"; in Initialize()
6086 Preamble += "#ifdef __OBJC_EXPORT_BLOCKS\n"; in Initialize()
6087 Preamble += "extern \"C\" __declspec(dllexport) " in Initialize()
6089Preamble += "extern \"C\" __declspec(dllexport) void _Block_object_dispose(const void *, const int… in Initialize()
6090 Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteGlobalBlock[32];\n"; in Initialize()
6091 Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteStackBlock[32];\n"; in Initialize()
6092 Preamble += "#else\n"; in Initialize()
6093 Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_assign(void *, const void *, const int);\n"; in Initialize()
6094 Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_dispose(const void *, const int);\n"; in Initialize()
6095 Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteGlobalBlock[32];\n"; in Initialize()
6096 Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteStackBlock[32];\n"; in Initialize()
6097 Preamble += "#endif\n"; in Initialize()
6098 Preamble += "#endif\n"; in Initialize()
6100 Preamble += "#undef __OBJC_RW_DLLIMPORT\n"; in Initialize()
6101 Preamble += "#undef __OBJC_RW_STATICIMPORT\n"; in Initialize()
6102 Preamble += "#ifndef KEEP_ATTRIBUTES\n"; // We use this for clang tests. in Initialize()
6103 Preamble += "#define __attribute__(X)\n"; in Initialize()
6104 Preamble += "#endif\n"; in Initialize()
6105 Preamble += "#ifndef __weak\n"; in Initialize()
6106 Preamble += "#define __weak\n"; in Initialize()
6107 Preamble += "#endif\n"; in Initialize()
6108 Preamble += "#ifndef __block\n"; in Initialize()
6109 Preamble += "#define __block\n"; in Initialize()
6110 Preamble += "#endif\n"; in Initialize()
6113 Preamble += "#define __block\n"; in Initialize()
6114 Preamble += "#define __weak\n"; in Initialize()
6118 Preamble += "\n#include <stdarg.h>\n"; in Initialize()
6119 Preamble += "struct __NSContainer_literal {\n"; in Initialize()
6120 Preamble += " void * *arr;\n"; in Initialize()
6121 Preamble += " __NSContainer_literal (unsigned int count, ...) {\n"; in Initialize()
6122 Preamble += "\tva_list marker;\n"; in Initialize()
6123 Preamble += "\tva_start(marker, count);\n"; in Initialize()
6124 Preamble += "\tarr = new void *[count];\n"; in Initialize()
6125 Preamble += "\tfor (unsigned i = 0; i < count; i++)\n"; in Initialize()
6126 Preamble += "\t arr[i] = va_arg(marker, void *);\n"; in Initialize()
6127 Preamble += "\tva_end( marker );\n"; in Initialize()
6128 Preamble += " };\n"; in Initialize()
6129 Preamble += " ~__NSContainer_literal() {\n"; in Initialize()
6130 Preamble += "\tdelete[] arr;\n"; in Initialize()
6131 Preamble += " }\n"; in Initialize()
6132 Preamble += "};\n"; in Initialize()
6135 Preamble += "extern \"C\" __declspec(dllimport) void * objc_autoreleasePoolPush(void);\n"; in Initialize()
6136 Preamble += "extern \"C\" __declspec(dllimport) void objc_autoreleasePoolPop(void *);\n\n"; in Initialize()
6137 Preamble += "struct __AtAutoreleasePool {\n"; in Initialize()
6138 Preamble += " __AtAutoreleasePool() {atautoreleasepoolobj = objc_autoreleasePoolPush();}\n"; in Initialize()
6139 Preamble += " ~__AtAutoreleasePool() {objc_autoreleasePoolPop(atautoreleasepoolobj);}\n"; in Initialize()
6140 Preamble += " void * atautoreleasepoolobj;\n"; in Initialize()
6141 Preamble += "};\n"; in Initialize()
6145 Preamble += "\n#define __OFFSETOFIVAR__(TYPE, MEMBER) ((long long) &((TYPE *)0)->MEMBER)\n"; in Initialize()