Lines Matching refs:Result
322 std::string &Result);
327 virtual void RewriteMetaDataIntoBuffer(std::string &Result) = 0;
331 std::string &Result) = 0;
333 std::string &Result) = 0;
337 std::string &Result) = 0;
339 std::string &Result) = 0;
344 std::string &Result) = 0;
525 std::string &Result);
528 std::string &Result) override;
531 StringRef prefix, StringRef ClassName, std::string &Result) override;
533 std::string &Result) override;
534 void RewriteMetaDataIntoBuffer(std::string &Result) override;
536 std::string &Result) override;
540 std::string &Result) override;
3105 std::string &Result) { in RewriteObjCInternalStruct() argument
3125 ReplaceText(LocStart, endBuf-startBuf, Result); in RewriteObjCInternalStruct()
3131 Result += "\nstruct "; in RewriteObjCInternalStruct()
3132 Result += CDecl->getNameAsString(); in RewriteObjCInternalStruct()
3134 Result += "_IMPL"; in RewriteObjCInternalStruct()
3167 ReplaceText(LocStart, endHeader-startBuf, Result); in RewriteObjCInternalStruct()
3170 ReplaceText(LocStart, cursor-startBuf, Result); in RewriteObjCInternalStruct()
3173 Result = "\n struct "; in RewriteObjCInternalStruct()
3174 Result += RCDecl->getNameAsString(); in RewriteObjCInternalStruct()
3175 Result += "_IMPL "; in RewriteObjCInternalStruct()
3176 Result += RCDecl->getNameAsString(); in RewriteObjCInternalStruct()
3177 Result += "_IVARS;\n"; in RewriteObjCInternalStruct()
3182 InsertText(OnePastCurly, Result); in RewriteObjCInternalStruct()
3222 Result += " {\n struct "; in RewriteObjCInternalStruct()
3223 Result += RCDecl->getNameAsString(); in RewriteObjCInternalStruct()
3224 Result += "_IMPL "; in RewriteObjCInternalStruct()
3225 Result += RCDecl->getNameAsString(); in RewriteObjCInternalStruct()
3226 Result += "_IVARS;\n};\n"; in RewriteObjCInternalStruct()
3227 ReplaceText(LocStart, endBuf-startBuf, Result); in RewriteObjCInternalStruct()
5095 std::string &Result) { in RewriteIvarOffsetComputation() argument
5099 Result += "0"; in RewriteIvarOffsetComputation()
5101 Result += "__OFFSETOFIVAR__(struct "; in RewriteIvarOffsetComputation()
5102 Result += ivar->getContainingInterface()->getNameAsString(); in RewriteIvarOffsetComputation()
5104 Result += "_IMPL"; in RewriteIvarOffsetComputation()
5105 Result += ", "; in RewriteIvarOffsetComputation()
5106 Result += ivar->getNameAsString(); in RewriteIvarOffsetComputation()
5107 Result += ")"; in RewriteIvarOffsetComputation()
5114 StringRef ClassName, std::string &Result) { in RewriteObjCProtocolMetaData() argument
5124 Result += "\nstruct _protocol_methods {\n"; in RewriteObjCProtocolMetaData()
5125 Result += "\tstruct objc_selector *_cmd;\n"; in RewriteObjCProtocolMetaData()
5126 Result += "\tchar *method_types;\n"; in RewriteObjCProtocolMetaData()
5127 Result += "};\n"; in RewriteObjCProtocolMetaData()
5146 Result += "\nstatic struct {\n"; in RewriteObjCProtocolMetaData()
5147 Result += "\tint protocol_method_count;\n"; in RewriteObjCProtocolMetaData()
5148 Result += "\tstruct _protocol_methods protocol_methods["; in RewriteObjCProtocolMetaData()
5149 Result += utostr(NumMethods); in RewriteObjCProtocolMetaData()
5150 Result += "];\n} _OBJC_PROTOCOL_INSTANCE_METHODS_"; in RewriteObjCProtocolMetaData()
5151 Result += PDecl->getNameAsString(); in RewriteObjCProtocolMetaData()
5152 Result += " __attribute__ ((used, section (\"__OBJC, __cat_inst_meth\")))= " in RewriteObjCProtocolMetaData()
5160 Result += "\t ,{{(struct objc_selector *)\""; in RewriteObjCProtocolMetaData()
5162 Result += "\t ,{(struct objc_selector *)\""; in RewriteObjCProtocolMetaData()
5163 Result += (*I)->getSelector().getAsString(); in RewriteObjCProtocolMetaData()
5166 Result += "\", \""; in RewriteObjCProtocolMetaData()
5167 Result += MethodTypeString; in RewriteObjCProtocolMetaData()
5168 Result += "\"}\n"; in RewriteObjCProtocolMetaData()
5170 Result += "\t }\n};\n"; in RewriteObjCProtocolMetaData()
5182 Result += "\nstatic struct {\n"; in RewriteObjCProtocolMetaData()
5183 Result += "\tint protocol_method_count;\n"; in RewriteObjCProtocolMetaData()
5184 Result += "\tstruct _protocol_methods protocol_methods["; in RewriteObjCProtocolMetaData()
5185 Result += utostr(NumMethods); in RewriteObjCProtocolMetaData()
5186 Result += "];\n} _OBJC_PROTOCOL_CLASS_METHODS_"; in RewriteObjCProtocolMetaData()
5187 Result += PDecl->getNameAsString(); in RewriteObjCProtocolMetaData()
5188 Result += " __attribute__ ((used, section (\"__OBJC, __cat_cls_meth\")))= " in RewriteObjCProtocolMetaData()
5190 Result += utostr(NumMethods); in RewriteObjCProtocolMetaData()
5191 Result += "\n"; in RewriteObjCProtocolMetaData()
5198 Result += "\t ,{{(struct objc_selector *)\""; in RewriteObjCProtocolMetaData()
5200 Result += "\t ,{(struct objc_selector *)\""; in RewriteObjCProtocolMetaData()
5201 Result += (*I)->getSelector().getAsString(); in RewriteObjCProtocolMetaData()
5204 Result += "\", \""; in RewriteObjCProtocolMetaData()
5205 Result += MethodTypeString; in RewriteObjCProtocolMetaData()
5206 Result += "\"}\n"; in RewriteObjCProtocolMetaData()
5208 Result += "\t }\n};\n"; in RewriteObjCProtocolMetaData()
5223 Result += "\nstruct _objc_protocol {\n"; in RewriteObjCProtocolMetaData()
5224 Result += "\tstruct _objc_protocol_extension *isa;\n"; in RewriteObjCProtocolMetaData()
5225 Result += "\tchar *protocol_name;\n"; in RewriteObjCProtocolMetaData()
5226 Result += "\tstruct _objc_protocol **protocol_list;\n"; in RewriteObjCProtocolMetaData()
5227 Result += "\tstruct _objc_protocol_method_list *instance_methods;\n"; in RewriteObjCProtocolMetaData()
5228 Result += "\tstruct _objc_protocol_method_list *class_methods;\n"; in RewriteObjCProtocolMetaData()
5229 Result += "};\n"; in RewriteObjCProtocolMetaData()
5234 Result += "\nstatic struct _objc_protocol _OBJC_PROTOCOL_"; in RewriteObjCProtocolMetaData()
5235 Result += PDecl->getNameAsString(); in RewriteObjCProtocolMetaData()
5236 Result += " __attribute__ ((used, section (\"__OBJC, __protocol\")))= " in RewriteObjCProtocolMetaData()
5238 Result += PDecl->getNameAsString(); in RewriteObjCProtocolMetaData()
5239 Result += "\", 0, "; in RewriteObjCProtocolMetaData()
5241 Result += "(struct _objc_protocol_method_list *)&_OBJC_PROTOCOL_INSTANCE_METHODS_"; in RewriteObjCProtocolMetaData()
5242 Result += PDecl->getNameAsString(); in RewriteObjCProtocolMetaData()
5243 Result += ", "; in RewriteObjCProtocolMetaData()
5246 Result += "0, "; in RewriteObjCProtocolMetaData()
5248 Result += "(struct _objc_protocol_method_list *)&_OBJC_PROTOCOL_CLASS_METHODS_"; in RewriteObjCProtocolMetaData()
5249 Result += PDecl->getNameAsString(); in RewriteObjCProtocolMetaData()
5250 Result += "\n"; in RewriteObjCProtocolMetaData()
5253 Result += "0\n"; in RewriteObjCProtocolMetaData()
5254 Result += "};\n"; in RewriteObjCProtocolMetaData()
5265 std::string &Result) { in RewriteObjCProtocolListMetaData() argument
5269 RewriteObjCProtocolMetaData(Protocols[i], prefix, ClassName, Result); in RewriteObjCProtocolListMetaData()
5278 Result += "\nstatic struct {\n"; in RewriteObjCProtocolListMetaData()
5279 Result += "\tstruct _objc_protocol_list *next;\n"; in RewriteObjCProtocolListMetaData()
5280 Result += "\tint protocol_count;\n"; in RewriteObjCProtocolListMetaData()
5281 Result += "\tstruct _objc_protocol *class_protocols["; in RewriteObjCProtocolListMetaData()
5282 Result += utostr(Protocols.size()); in RewriteObjCProtocolListMetaData()
5283 Result += "];\n} _OBJC_"; in RewriteObjCProtocolListMetaData()
5284 Result += prefix; in RewriteObjCProtocolListMetaData()
5285 Result += "_PROTOCOLS_"; in RewriteObjCProtocolListMetaData()
5286 Result += ClassName; in RewriteObjCProtocolListMetaData()
5287 Result += " __attribute__ ((used, section (\"__OBJC, __cat_cls_meth\")))= " in RewriteObjCProtocolListMetaData()
5289 Result += utostr(Protocols.size()); in RewriteObjCProtocolListMetaData()
5290 Result += "\n"; in RewriteObjCProtocolListMetaData()
5292 Result += "\t,{&_OBJC_PROTOCOL_"; in RewriteObjCProtocolListMetaData()
5293 Result += Protocols[0]->getNameAsString(); in RewriteObjCProtocolListMetaData()
5294 Result += " \n"; in RewriteObjCProtocolListMetaData()
5297 Result += "\t ,&_OBJC_PROTOCOL_"; in RewriteObjCProtocolListMetaData()
5298 Result += Protocols[i]->getNameAsString(); in RewriteObjCProtocolListMetaData()
5299 Result += "\n"; in RewriteObjCProtocolListMetaData()
5301 Result += "\t }\n};\n"; in RewriteObjCProtocolListMetaData()
5305 std::string &Result) { in RewriteObjCClassMetaData() argument
5312 RewriteObjCInternalStruct(CDecl, Result); in RewriteObjCClassMetaData()
5328 Result += "\nstruct _objc_ivar {\n"; in RewriteObjCClassMetaData()
5329 Result += "\tchar *ivar_name;\n"; in RewriteObjCClassMetaData()
5330 Result += "\tchar *ivar_type;\n"; in RewriteObjCClassMetaData()
5331 Result += "\tint ivar_offset;\n"; in RewriteObjCClassMetaData()
5332 Result += "};\n"; in RewriteObjCClassMetaData()
5342 Result += "\nstatic struct {\n"; in RewriteObjCClassMetaData()
5343 Result += "\tint ivar_count;\n"; in RewriteObjCClassMetaData()
5344 Result += "\tstruct _objc_ivar ivar_list["; in RewriteObjCClassMetaData()
5345 Result += utostr(NumIvars); in RewriteObjCClassMetaData()
5346 Result += "];\n} _OBJC_INSTANCE_VARIABLES_"; in RewriteObjCClassMetaData()
5347 Result += IDecl->getNameAsString(); in RewriteObjCClassMetaData()
5348 Result += " __attribute__ ((used, section (\"__OBJC, __instance_vars\")))= " in RewriteObjCClassMetaData()
5350 Result += utostr(NumIvars); in RewriteObjCClassMetaData()
5351 Result += "\n"; in RewriteObjCClassMetaData()
5364 Result += "\t,{{\""; in RewriteObjCClassMetaData()
5365 Result += IVI->getNameAsString(); in RewriteObjCClassMetaData()
5366 Result += "\", \""; in RewriteObjCClassMetaData()
5370 Result += StrEncoding; in RewriteObjCClassMetaData()
5371 Result += "\", "; in RewriteObjCClassMetaData()
5372 RewriteIvarOffsetComputation(*IVI, Result); in RewriteObjCClassMetaData()
5373 Result += "}\n"; in RewriteObjCClassMetaData()
5375 Result += "\t ,{\""; in RewriteObjCClassMetaData()
5376 Result += IVI->getNameAsString(); in RewriteObjCClassMetaData()
5377 Result += "\", \""; in RewriteObjCClassMetaData()
5381 Result += StrEncoding; in RewriteObjCClassMetaData()
5382 Result += "\", "; in RewriteObjCClassMetaData()
5383 RewriteIvarOffsetComputation(*IVI, Result); in RewriteObjCClassMetaData()
5384 Result += "}\n"; in RewriteObjCClassMetaData()
5387 Result += "\t }\n};\n"; in RewriteObjCClassMetaData()
5413 true, "", IDecl->getName(), Result); in RewriteObjCClassMetaData()
5417 false, "", IDecl->getName(), Result); in RewriteObjCClassMetaData()
5421 "CLASS", CDecl->getName(), Result); in RewriteObjCClassMetaData()
5441 Result += "\nstruct _objc_class {\n"; in RewriteObjCClassMetaData()
5442 Result += "\tstruct _objc_class *isa;\n"; in RewriteObjCClassMetaData()
5443 Result += "\tconst char *super_class_name;\n"; in RewriteObjCClassMetaData()
5444 Result += "\tchar *name;\n"; in RewriteObjCClassMetaData()
5445 Result += "\tlong version;\n"; in RewriteObjCClassMetaData()
5446 Result += "\tlong info;\n"; in RewriteObjCClassMetaData()
5447 Result += "\tlong instance_size;\n"; in RewriteObjCClassMetaData()
5448 Result += "\tstruct _objc_ivar_list *ivars;\n"; in RewriteObjCClassMetaData()
5449 Result += "\tstruct _objc_method_list *methods;\n"; in RewriteObjCClassMetaData()
5450 Result += "\tstruct objc_cache *cache;\n"; in RewriteObjCClassMetaData()
5451 Result += "\tstruct _objc_protocol_list *protocols;\n"; in RewriteObjCClassMetaData()
5452 Result += "\tconst char *ivar_layout;\n"; in RewriteObjCClassMetaData()
5453 Result += "\tstruct _objc_class_ext *ext;\n"; in RewriteObjCClassMetaData()
5454 Result += "};\n"; in RewriteObjCClassMetaData()
5467 Result += "\nstatic struct _objc_class _OBJC_METACLASS_"; in RewriteObjCClassMetaData()
5468 Result += CDecl->getNameAsString(); in RewriteObjCClassMetaData()
5469 Result += " __attribute__ ((used, section (\"__OBJC, __meta_class\")))= " in RewriteObjCClassMetaData()
5471 Result += (RootClass ? RootClass->getNameAsString() : CDecl->getNameAsString()); in RewriteObjCClassMetaData()
5472 Result += "\""; in RewriteObjCClassMetaData()
5475 Result += ", \""; in RewriteObjCClassMetaData()
5476 Result += SuperClass->getNameAsString(); in RewriteObjCClassMetaData()
5477 Result += "\", \""; in RewriteObjCClassMetaData()
5478 Result += CDecl->getNameAsString(); in RewriteObjCClassMetaData()
5479 Result += "\""; in RewriteObjCClassMetaData()
5482 Result += ", 0, \""; in RewriteObjCClassMetaData()
5483 Result += CDecl->getNameAsString(); in RewriteObjCClassMetaData()
5484 Result += "\""; in RewriteObjCClassMetaData()
5488 Result += ", 0,2, sizeof(struct _objc_class), 0"; in RewriteObjCClassMetaData()
5490 Result += "\n\t, (struct _objc_method_list *)&_OBJC_CLASS_METHODS_"; in RewriteObjCClassMetaData()
5491 Result += IDecl->getNameAsString(); in RewriteObjCClassMetaData()
5492 Result += "\n"; in RewriteObjCClassMetaData()
5495 Result += ", 0\n"; in RewriteObjCClassMetaData()
5497 Result += "\t,0, (struct _objc_protocol_list *)&_OBJC_CLASS_PROTOCOLS_"; in RewriteObjCClassMetaData()
5498 Result += CDecl->getNameAsString(); in RewriteObjCClassMetaData()
5499 Result += ",0,0\n"; in RewriteObjCClassMetaData()
5502 Result += "\t,0,0,0,0\n"; in RewriteObjCClassMetaData()
5503 Result += "};\n"; in RewriteObjCClassMetaData()
5506 Result += "\nstatic struct _objc_class _OBJC_CLASS_"; in RewriteObjCClassMetaData()
5507 Result += CDecl->getNameAsString(); in RewriteObjCClassMetaData()
5508 Result += " __attribute__ ((used, section (\"__OBJC, __class\")))= " in RewriteObjCClassMetaData()
5510 Result += CDecl->getNameAsString(); in RewriteObjCClassMetaData()
5512 Result += ", \""; in RewriteObjCClassMetaData()
5513 Result += SuperClass->getNameAsString(); in RewriteObjCClassMetaData()
5514 Result += "\", \""; in RewriteObjCClassMetaData()
5515 Result += CDecl->getNameAsString(); in RewriteObjCClassMetaData()
5516 Result += "\""; in RewriteObjCClassMetaData()
5519 Result += ", 0, \""; in RewriteObjCClassMetaData()
5520 Result += CDecl->getNameAsString(); in RewriteObjCClassMetaData()
5521 Result += "\""; in RewriteObjCClassMetaData()
5524 Result += ", 0,1"; in RewriteObjCClassMetaData()
5526 Result += ",0"; in RewriteObjCClassMetaData()
5529 Result += ",sizeof(struct "; in RewriteObjCClassMetaData()
5530 Result += CDecl->getNameAsString(); in RewriteObjCClassMetaData()
5532 Result += "_IMPL"; in RewriteObjCClassMetaData()
5533 Result += ")"; in RewriteObjCClassMetaData()
5536 Result += ", (struct _objc_ivar_list *)&_OBJC_INSTANCE_VARIABLES_"; in RewriteObjCClassMetaData()
5537 Result += CDecl->getNameAsString(); in RewriteObjCClassMetaData()
5538 Result += "\n\t"; in RewriteObjCClassMetaData()
5541 Result += ",0"; in RewriteObjCClassMetaData()
5543 Result += ", (struct _objc_method_list *)&_OBJC_INSTANCE_METHODS_"; in RewriteObjCClassMetaData()
5544 Result += CDecl->getNameAsString(); in RewriteObjCClassMetaData()
5545 Result += ", 0\n\t"; in RewriteObjCClassMetaData()
5548 Result += ",0,0"; in RewriteObjCClassMetaData()
5550 Result += ", (struct _objc_protocol_list*)&_OBJC_CLASS_PROTOCOLS_"; in RewriteObjCClassMetaData()
5551 Result += CDecl->getNameAsString(); in RewriteObjCClassMetaData()
5552 Result += ", 0,0\n"; in RewriteObjCClassMetaData()
5555 Result += ",0,0,0\n"; in RewriteObjCClassMetaData()
5556 Result += "};\n"; in RewriteObjCClassMetaData()
5559 void RewriteObjCFragileABI::RewriteMetaDataIntoBuffer(std::string &Result) { in RewriteMetaDataIntoBuffer() argument
5565 RewriteObjCClassMetaData(ClassImplementation[i], Result); in RewriteMetaDataIntoBuffer()
5569 RewriteObjCCategoryImplDecl(CategoryImplementation[i], Result); in RewriteMetaDataIntoBuffer()
5583 Result += "\nstruct _objc_symtab {\n"; in RewriteMetaDataIntoBuffer()
5584 Result += "\tlong sel_ref_cnt;\n"; in RewriteMetaDataIntoBuffer()
5585 Result += "\tSEL *refs;\n"; in RewriteMetaDataIntoBuffer()
5586 Result += "\tshort cls_def_cnt;\n"; in RewriteMetaDataIntoBuffer()
5587 Result += "\tshort cat_def_cnt;\n"; in RewriteMetaDataIntoBuffer()
5588 Result += "\tvoid *defs[" + utostr(ClsDefCount + CatDefCount)+ "];\n"; in RewriteMetaDataIntoBuffer()
5589 Result += "};\n\n"; in RewriteMetaDataIntoBuffer()
5591 Result += "static struct _objc_symtab " in RewriteMetaDataIntoBuffer()
5593 Result += "\t0, 0, " + utostr(ClsDefCount) in RewriteMetaDataIntoBuffer()
5596 Result += "\t,&_OBJC_CLASS_"; in RewriteMetaDataIntoBuffer()
5597 Result += ClassImplementation[i]->getNameAsString(); in RewriteMetaDataIntoBuffer()
5598 Result += "\n"; in RewriteMetaDataIntoBuffer()
5602 Result += "\t,&_OBJC_CATEGORY_"; in RewriteMetaDataIntoBuffer()
5603 Result += CategoryImplementation[i]->getClassInterface()->getNameAsString(); in RewriteMetaDataIntoBuffer()
5604 Result += "_"; in RewriteMetaDataIntoBuffer()
5605 Result += CategoryImplementation[i]->getNameAsString(); in RewriteMetaDataIntoBuffer()
5606 Result += "\n"; in RewriteMetaDataIntoBuffer()
5609 Result += "};\n\n"; in RewriteMetaDataIntoBuffer()
5622 Result += "\nstruct _objc_module {\n"; in RewriteMetaDataIntoBuffer()
5623 Result += "\tlong version;\n"; in RewriteMetaDataIntoBuffer()
5624 Result += "\tlong size;\n"; in RewriteMetaDataIntoBuffer()
5625 Result += "\tconst char *name;\n"; in RewriteMetaDataIntoBuffer()
5626 Result += "\tstruct _objc_symtab *symtab;\n"; in RewriteMetaDataIntoBuffer()
5627 Result += "};\n\n"; in RewriteMetaDataIntoBuffer()
5628 Result += "static struct _objc_module " in RewriteMetaDataIntoBuffer()
5630 Result += "\t" + utostr(OBJC_ABI_VERSION) + in RewriteMetaDataIntoBuffer()
5632 Result += "};\n\n"; in RewriteMetaDataIntoBuffer()
5636 Result += "#pragma section(\".objc_protocol$B\",long,read,write)\n"; in RewriteMetaDataIntoBuffer()
5637 Result += "#pragma data_seg(push, \".objc_protocol$B\")\n"; in RewriteMetaDataIntoBuffer()
5639 Result += "static struct _objc_protocol *_POINTER_OBJC_PROTOCOL_"; in RewriteMetaDataIntoBuffer()
5640 Result += ProtDecl->getNameAsString(); in RewriteMetaDataIntoBuffer()
5641 Result += " = &_OBJC_PROTOCOL_"; in RewriteMetaDataIntoBuffer()
5642 Result += ProtDecl->getNameAsString(); in RewriteMetaDataIntoBuffer()
5643 Result += ";\n"; in RewriteMetaDataIntoBuffer()
5645 Result += "#pragma data_seg(pop)\n\n"; in RewriteMetaDataIntoBuffer()
5647 Result += "#pragma section(\".objc_module_info$B\",long,read,write)\n"; in RewriteMetaDataIntoBuffer()
5648 Result += "#pragma data_seg(push, \".objc_module_info$B\")\n"; in RewriteMetaDataIntoBuffer()
5649 Result += "static struct _objc_module *_POINTER_OBJC_MODULES = "; in RewriteMetaDataIntoBuffer()
5650 Result += "&_OBJC_MODULES;\n"; in RewriteMetaDataIntoBuffer()
5651 Result += "#pragma data_seg(pop)\n\n"; in RewriteMetaDataIntoBuffer()
5658 std::string &Result) { in RewriteObjCCategoryImplDecl() argument
5690 Result); in RewriteObjCCategoryImplDecl()
5695 Result); in RewriteObjCCategoryImplDecl()
5701 FullCategoryName, Result); in RewriteObjCCategoryImplDecl()
5717 Result += "\nstruct _objc_category {\n"; in RewriteObjCCategoryImplDecl()
5718 Result += "\tchar *category_name;\n"; in RewriteObjCCategoryImplDecl()
5719 Result += "\tchar *class_name;\n"; in RewriteObjCCategoryImplDecl()
5720 Result += "\tstruct _objc_method_list *instance_methods;\n"; in RewriteObjCCategoryImplDecl()
5721 Result += "\tstruct _objc_method_list *class_methods;\n"; in RewriteObjCCategoryImplDecl()
5722 Result += "\tstruct _objc_protocol_list *protocols;\n"; in RewriteObjCCategoryImplDecl()
5723 Result += "\tunsigned int size;\n"; in RewriteObjCCategoryImplDecl()
5724 Result += "\tstruct _objc_property_list *instance_properties;\n"; in RewriteObjCCategoryImplDecl()
5725 Result += "};\n"; in RewriteObjCCategoryImplDecl()
5728 Result += "\nstatic struct _objc_category _OBJC_CATEGORY_"; in RewriteObjCCategoryImplDecl()
5729 Result += FullCategoryName; in RewriteObjCCategoryImplDecl()
5730 Result += " __attribute__ ((used, section (\"__OBJC, __category\")))= {\n\t\""; in RewriteObjCCategoryImplDecl()
5731 Result += IDecl->getNameAsString(); in RewriteObjCCategoryImplDecl()
5732 Result += "\"\n\t, \""; in RewriteObjCCategoryImplDecl()
5733 Result += ClassDecl->getNameAsString(); in RewriteObjCCategoryImplDecl()
5734 Result += "\"\n"; in RewriteObjCCategoryImplDecl()
5737 Result += "\t, (struct _objc_method_list *)" in RewriteObjCCategoryImplDecl()
5739 Result += FullCategoryName; in RewriteObjCCategoryImplDecl()
5740 Result += "\n"; in RewriteObjCCategoryImplDecl()
5743 Result += "\t, 0\n"; in RewriteObjCCategoryImplDecl()
5745 Result += "\t, (struct _objc_method_list *)" in RewriteObjCCategoryImplDecl()
5747 Result += FullCategoryName; in RewriteObjCCategoryImplDecl()
5748 Result += "\n"; in RewriteObjCCategoryImplDecl()
5751 Result += "\t, 0\n"; in RewriteObjCCategoryImplDecl()
5754 Result += "\t, (struct _objc_protocol_list *)&_OBJC_CATEGORY_PROTOCOLS_"; in RewriteObjCCategoryImplDecl()
5755 Result += FullCategoryName; in RewriteObjCCategoryImplDecl()
5756 Result += "\n"; in RewriteObjCCategoryImplDecl()
5759 Result += "\t, 0\n"; in RewriteObjCCategoryImplDecl()
5760 Result += "\t, sizeof(struct _objc_category), 0\n};\n"; in RewriteObjCCategoryImplDecl()
5771 std::string &Result) { in RewriteObjCMethodsMetaData() argument
5781 Result += "\nstruct _objc_method {\n"; in RewriteObjCMethodsMetaData()
5782 Result += "\tSEL _cmd;\n"; in RewriteObjCMethodsMetaData()
5783 Result += "\tchar *method_types;\n"; in RewriteObjCMethodsMetaData()
5784 Result += "\tvoid *_imp;\n"; in RewriteObjCMethodsMetaData()
5785 Result += "};\n"; in RewriteObjCMethodsMetaData()
5799 Result += "\nstatic struct {\n"; in RewriteObjCMethodsMetaData()
5800 Result += "\tstruct _objc_method_list *next_method;\n"; in RewriteObjCMethodsMetaData()
5801 Result += "\tint method_count;\n"; in RewriteObjCMethodsMetaData()
5802 Result += "\tstruct _objc_method method_list["; in RewriteObjCMethodsMetaData()
5803 Result += utostr(NumMethods); in RewriteObjCMethodsMetaData()
5804 Result += "];\n} _OBJC_"; in RewriteObjCMethodsMetaData()
5805 Result += prefix; in RewriteObjCMethodsMetaData()
5806 Result += IsInstanceMethod ? "INSTANCE" : "CLASS"; in RewriteObjCMethodsMetaData()
5807 Result += "_METHODS_"; in RewriteObjCMethodsMetaData()
5808 Result += ClassName; in RewriteObjCMethodsMetaData()
5809 Result += " __attribute__ ((used, section (\"__OBJC, __"; in RewriteObjCMethodsMetaData()
5810 Result += IsInstanceMethod ? "inst" : "cls"; in RewriteObjCMethodsMetaData()
5811 Result += "_meth\")))= "; in RewriteObjCMethodsMetaData()
5812 Result += "{\n\t0, " + utostr(NumMethods) + "\n"; in RewriteObjCMethodsMetaData()
5814 Result += "\t,{{(SEL)\""; in RewriteObjCMethodsMetaData()
5815 Result += (*MethodBegin)->getSelector().getAsString().c_str(); in RewriteObjCMethodsMetaData()
5818 Result += "\", \""; in RewriteObjCMethodsMetaData()
5819 Result += MethodTypeString; in RewriteObjCMethodsMetaData()
5820 Result += "\", (void *)"; in RewriteObjCMethodsMetaData()
5821 Result += MethodInternalNames[*MethodBegin]; in RewriteObjCMethodsMetaData()
5822 Result += "}\n"; in RewriteObjCMethodsMetaData()
5824 Result += "\t ,{(SEL)\""; in RewriteObjCMethodsMetaData()
5825 Result += (*MethodBegin)->getSelector().getAsString().c_str(); in RewriteObjCMethodsMetaData()
5828 Result += "\", \""; in RewriteObjCMethodsMetaData()
5829 Result += MethodTypeString; in RewriteObjCMethodsMetaData()
5830 Result += "\", (void *)"; in RewriteObjCMethodsMetaData()
5831 Result += MethodInternalNames[*MethodBegin]; in RewriteObjCMethodsMetaData()
5832 Result += "}\n"; in RewriteObjCMethodsMetaData()
5834 Result += "\t }\n};\n"; in RewriteObjCMethodsMetaData()