reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
 2569   Preamble += "static __NSConstantStringImpl " + S;
 2570   Preamble += " __attribute__ ((section (\"__DATA, __cfstring\"))) = {__CFConstantStringClassReference,";
 2571   Preamble += "0x000007c8,"; // utf8_str
 2576   Preamble += prettyBuf.str();
 2577   Preamble += ",";
 2578   Preamble += utostr(Exp->getString()->getByteLength()) + "};\n";
 5072       Preamble += HF;
 5837     RewriteObjCProtocolMetaData(ProtDecl, Preamble);
 5838     Write_ProtocolExprReferencedMetadata(Context, ProtDecl, Preamble);
 5841   InsertText(SM->getLocForStartOfFile(MainFileID), Preamble, false);
 5885   Preamble += "#ifndef __OBJC2__\n";
 5886   Preamble += "#define __OBJC2__\n";
 5887   Preamble += "#endif\n";
 5892     Preamble = "#pragma once\n";
 5893   Preamble += "struct objc_selector; struct objc_class;\n";
 5894   Preamble += "struct __rw_objc_super { \n\tstruct objc_object *object; ";
 5895   Preamble += "\n\tstruct objc_object *superClass; ";
 5897   Preamble += "\n\t__rw_objc_super(struct objc_object *o, struct objc_object *s) ";
 5898   Preamble += ": object(o), superClass(s) {} ";
 5899   Preamble += "\n};\n";
 5904     Preamble += "\n#pragma section(\".objc_classlist$B\", long, read, write)\n";
 5905     Preamble += "#pragma section(\".objc_catlist$B\", long, read, write)\n";
 5906     Preamble += "#pragma section(\".objc_imageinfo$B\", long, read, write)\n";
 5907     Preamble += "#pragma section(\".objc_nlclslist$B\", long, read, write)\n";
 5908     Preamble += "#pragma section(\".objc_nlcatlist$B\", long, read, write)\n";
 5910     Preamble += "#pragma section(\".cat_cls_meth$B\", long, read, write)\n";
 5911     Preamble += "#pragma section(\".inst_meth$B\", long, read, write)\n";
 5912     Preamble += "#pragma section(\".cls_meth$B\", long, read, write)\n";
 5913     Preamble += "#pragma section(\".objc_ivar$B\", long, read, write)\n";
 5917     Preamble += "#pragma section(\".objc_selrefs$B\", long, read, write)\n";
 5918     Preamble += "#pragma section(\".objc_classrefs$B\", long, read, write)\n";
 5919     Preamble += "#pragma section(\".objc_superrefs$B\", long, read, write)\n";
 5922   Preamble += "#ifndef _REWRITER_typedef_Protocol\n";
 5923   Preamble += "typedef struct objc_object Protocol;\n";
 5924   Preamble += "#define _REWRITER_typedef_Protocol\n";
 5925   Preamble += "#endif\n";
 5927     Preamble += "#define __OBJC_RW_DLLIMPORT extern \"C\" __declspec(dllimport)\n";
 5928     Preamble += "#define __OBJC_RW_STATICIMPORT extern \"C\"\n";
 5931     Preamble += "#define __OBJC_RW_DLLIMPORT extern\n";
 5933   Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSend(void);\n";
 5934   Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSendSuper(void);\n";
 5935   Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSend_stret(void);\n";
 5936   Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSendSuper_stret(void);\n";
 5937   Preamble += "__OBJC_RW_DLLIMPORT void objc_msgSend_fpret(void);\n";
 5939   Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *objc_getClass";
 5940   Preamble += "(const char *);\n";
 5941   Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *class_getSuperclass";
 5942   Preamble += "(struct objc_class *);\n";
 5943   Preamble += "__OBJC_RW_DLLIMPORT struct objc_class *objc_getMetaClass";
 5944   Preamble += "(const char *);\n";
 5945   Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_throw( struct objc_object *);\n";
 5947   Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_enter( struct objc_object *);\n";
 5948   Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_exit( struct objc_object *);\n";
 5949   Preamble += "__OBJC_RW_DLLIMPORT Protocol *objc_getProtocol(const char *);\n";
 5950   Preamble += "#ifdef _WIN64\n";
 5951   Preamble += "typedef unsigned long long  _WIN_NSUInteger;\n";
 5952   Preamble += "#else\n";
 5953   Preamble += "typedef unsigned int _WIN_NSUInteger;\n";
 5954   Preamble += "#endif\n";
 5955   Preamble += "#ifndef __FASTENUMERATIONSTATE\n";
 5956   Preamble += "struct __objcFastEnumerationState {\n\t";
 5957   Preamble += "unsigned long state;\n\t";
 5958   Preamble += "void **itemsPtr;\n\t";
 5959   Preamble += "unsigned long *mutationsPtr;\n\t";
 5960   Preamble += "unsigned long extra[5];\n};\n";
 5961   Preamble += "__OBJC_RW_DLLIMPORT void objc_enumerationMutation(struct objc_object *);\n";
 5962   Preamble += "#define __FASTENUMERATIONSTATE\n";
 5963   Preamble += "#endif\n";
 5964   Preamble += "#ifndef __NSCONSTANTSTRINGIMPL\n";
 5965   Preamble += "struct __NSConstantStringImpl {\n";
 5966   Preamble += "  int *isa;\n";
 5967   Preamble += "  int flags;\n";
 5968   Preamble += "  char *str;\n";
 5969   Preamble += "#if _WIN64\n";
 5970   Preamble += "  long long length;\n";
 5971   Preamble += "#else\n";
 5972   Preamble += "  long length;\n";
 5973   Preamble += "#endif\n";
 5974   Preamble += "};\n";
 5975   Preamble += "#ifdef CF_EXPORT_CONSTANT_STRING\n";
 5976   Preamble += "extern \"C\" __declspec(dllexport) int __CFConstantStringClassReference[];\n";
 5977   Preamble += "#else\n";
 5978   Preamble += "__OBJC_RW_DLLIMPORT int __CFConstantStringClassReference[];\n";
 5979   Preamble += "#endif\n";
 5980   Preamble += "#define __NSCONSTANTSTRINGIMPL\n";
 5981   Preamble += "#endif\n";
 5983   Preamble += "#ifndef BLOCK_IMPL\n";
 5984   Preamble += "#define BLOCK_IMPL\n";
 5985   Preamble += "struct __block_impl {\n";
 5986   Preamble += "  void *isa;\n";
 5987   Preamble += "  int Flags;\n";
 5988   Preamble += "  int Reserved;\n";
 5989   Preamble += "  void *FuncPtr;\n";
 5990   Preamble += "};\n";
 5991   Preamble += "// Runtime copy/destroy helper functions (from Block_private.h)\n";
 5992   Preamble += "#ifdef __OBJC_EXPORT_BLOCKS\n";
 5993   Preamble += "extern \"C\" __declspec(dllexport) "
 5995   Preamble += "extern \"C\" __declspec(dllexport) void _Block_object_dispose(const void *, const int);\n";
 5996   Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteGlobalBlock[32];\n";
 5997   Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteStackBlock[32];\n";
 5998   Preamble += "#else\n";
 5999   Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_assign(void *, const void *, const int);\n";
 6000   Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_dispose(const void *, const int);\n";
 6001   Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteGlobalBlock[32];\n";
 6002   Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteStackBlock[32];\n";
 6003   Preamble += "#endif\n";
 6004   Preamble += "#endif\n";
 6006     Preamble += "#undef __OBJC_RW_DLLIMPORT\n";
 6007     Preamble += "#undef __OBJC_RW_STATICIMPORT\n";
 6008     Preamble += "#ifndef KEEP_ATTRIBUTES\n";  // We use this for clang tests.
 6009     Preamble += "#define __attribute__(X)\n";
 6010     Preamble += "#endif\n";
 6011     Preamble += "#ifndef __weak\n";
 6012     Preamble += "#define __weak\n";
 6013     Preamble += "#endif\n";
 6014     Preamble += "#ifndef __block\n";
 6015     Preamble += "#define __block\n";
 6016     Preamble += "#endif\n";
 6019     Preamble += "#define __block\n";
 6020     Preamble += "#define __weak\n";
 6024   Preamble += "\n#include <stdarg.h>\n";
 6025   Preamble += "struct __NSContainer_literal {\n";
 6026   Preamble += "  void * *arr;\n";
 6027   Preamble += "  __NSContainer_literal (unsigned int count, ...) {\n";
 6028   Preamble += "\tva_list marker;\n";
 6029   Preamble += "\tva_start(marker, count);\n";
 6030   Preamble += "\tarr = new void *[count];\n";
 6031   Preamble += "\tfor (unsigned i = 0; i < count; i++)\n";
 6032   Preamble += "\t  arr[i] = va_arg(marker, void *);\n";
 6033   Preamble += "\tva_end( marker );\n";
 6034   Preamble += "  };\n";
 6035   Preamble += "  ~__NSContainer_literal() {\n";
 6036   Preamble += "\tdelete[] arr;\n";
 6037   Preamble += "  }\n";
 6038   Preamble += "};\n";
 6041   Preamble += "extern \"C\" __declspec(dllimport) void * objc_autoreleasePoolPush(void);\n";
 6042   Preamble += "extern \"C\" __declspec(dllimport) void objc_autoreleasePoolPop(void *);\n\n";
 6043   Preamble += "struct __AtAutoreleasePool {\n";
 6044   Preamble += "  __AtAutoreleasePool() {atautoreleasepoolobj = objc_autoreleasePoolPush();}\n";
 6045   Preamble += "  ~__AtAutoreleasePool() {objc_autoreleasePoolPop(atautoreleasepoolobj);}\n";
 6046   Preamble += "  void * atautoreleasepoolobj;\n";
 6047   Preamble += "};\n";
 6051   Preamble += "\n#define __OFFSETOFIVAR__(TYPE, MEMBER) ((long long) &((TYPE *)0)->MEMBER)\n";