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;
479 QualType getSimpleFunctionType(QualType result,
482 if (result == Context->getObjCInstanceType())
483 result = Context->getObjCIdType();
486 return Context->getFunctionType(result, args, fpi);
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;
3094 std::string &Result) {
3114 ReplaceText(LocStart, endBuf-startBuf, Result);
3120 Result += "\nstruct ";
3121 Result += CDecl->getNameAsString();
3123 Result += "_IMPL";
3156 ReplaceText(LocStart, endHeader-startBuf, Result);
3159 ReplaceText(LocStart, cursor-startBuf, Result);
3162 Result = "\n struct ";
3163 Result += RCDecl->getNameAsString();
3164 Result += "_IMPL ";
3165 Result += RCDecl->getNameAsString();
3166 Result += "_IVARS;\n";
3171 InsertText(OnePastCurly, Result);
3211 Result += " {\n struct ";
3212 Result += RCDecl->getNameAsString();
3213 Result += "_IMPL ";
3214 Result += RCDecl->getNameAsString();
3215 Result += "_IVARS;\n};\n";
3216 ReplaceText(LocStart, endBuf-startBuf, Result);
3608 // removed as result of rewriting of block literals.
3702 /// whose result type may be a block pointer or whose argument type(s)
5080 std::string &Result) {
5084 Result += "0";
5086 Result += "__OFFSETOFIVAR__(struct ";
5087 Result += ivar->getContainingInterface()->getNameAsString();
5089 Result += "_IMPL";
5090 Result += ", ";
5091 Result += ivar->getNameAsString();
5092 Result += ")";
5099 StringRef ClassName, std::string &Result) {
5109 Result += "\nstruct _protocol_methods {\n";
5110 Result += "\tstruct objc_selector *_cmd;\n";
5111 Result += "\tchar *method_types;\n";
5112 Result += "};\n";
5131 Result += "\nstatic struct {\n";
5132 Result += "\tint protocol_method_count;\n";
5133 Result += "\tstruct _protocol_methods protocol_methods[";
5134 Result += utostr(NumMethods);
5135 Result += "];\n} _OBJC_PROTOCOL_INSTANCE_METHODS_";
5136 Result += PDecl->getNameAsString();
5137 Result += " __attribute__ ((used, section (\"__OBJC, __cat_inst_meth\")))= "
5145 Result += "\t ,{{(struct objc_selector *)\"";
5147 Result += "\t ,{(struct objc_selector *)\"";
5148 Result += (*I)->getSelector().getAsString();
5151 Result += "\", \"";
5152 Result += MethodTypeString;
5153 Result += "\"}\n";
5155 Result += "\t }\n};\n";
5167 Result += "\nstatic struct {\n";
5168 Result += "\tint protocol_method_count;\n";
5169 Result += "\tstruct _protocol_methods protocol_methods[";
5170 Result += utostr(NumMethods);
5171 Result += "];\n} _OBJC_PROTOCOL_CLASS_METHODS_";
5172 Result += PDecl->getNameAsString();
5173 Result += " __attribute__ ((used, section (\"__OBJC, __cat_cls_meth\")))= "
5175 Result += utostr(NumMethods);
5176 Result += "\n";
5183 Result += "\t ,{{(struct objc_selector *)\"";
5185 Result += "\t ,{(struct objc_selector *)\"";
5186 Result += (*I)->getSelector().getAsString();
5189 Result += "\", \"";
5190 Result += MethodTypeString;
5191 Result += "\"}\n";
5193 Result += "\t }\n};\n";
5208 Result += "\nstruct _objc_protocol {\n";
5209 Result += "\tstruct _objc_protocol_extension *isa;\n";
5210 Result += "\tchar *protocol_name;\n";
5211 Result += "\tstruct _objc_protocol **protocol_list;\n";
5212 Result += "\tstruct _objc_protocol_method_list *instance_methods;\n";
5213 Result += "\tstruct _objc_protocol_method_list *class_methods;\n";
5214 Result += "};\n";
5219 Result += "\nstatic struct _objc_protocol _OBJC_PROTOCOL_";
5220 Result += PDecl->getNameAsString();
5221 Result += " __attribute__ ((used, section (\"__OBJC, __protocol\")))= "
5223 Result += PDecl->getNameAsString();
5224 Result += "\", 0, ";
5226 Result += "(struct _objc_protocol_method_list *)&_OBJC_PROTOCOL_INSTANCE_METHODS_";
5227 Result += PDecl->getNameAsString();
5228 Result += ", ";
5231 Result += "0, ";
5233 Result += "(struct _objc_protocol_method_list *)&_OBJC_PROTOCOL_CLASS_METHODS_";
5234 Result += PDecl->getNameAsString();
5235 Result += "\n";
5238 Result += "0\n";
5239 Result += "};\n";
5250 std::string &Result) {
5254 RewriteObjCProtocolMetaData(Protocols[i], prefix, ClassName, Result);
5263 Result += "\nstatic struct {\n";
5264 Result += "\tstruct _objc_protocol_list *next;\n";
5265 Result += "\tint protocol_count;\n";
5266 Result += "\tstruct _objc_protocol *class_protocols[";
5267 Result += utostr(Protocols.size());
5268 Result += "];\n} _OBJC_";
5269 Result += prefix;
5270 Result += "_PROTOCOLS_";
5271 Result += ClassName;
5272 Result += " __attribute__ ((used, section (\"__OBJC, __cat_cls_meth\")))= "
5274 Result += utostr(Protocols.size());
5275 Result += "\n";
5277 Result += "\t,{&_OBJC_PROTOCOL_";
5278 Result += Protocols[0]->getNameAsString();
5279 Result += " \n";
5282 Result += "\t ,&_OBJC_PROTOCOL_";
5283 Result += Protocols[i]->getNameAsString();
5284 Result += "\n";
5286 Result += "\t }\n};\n";
5290 std::string &Result) {
5297 RewriteObjCInternalStruct(CDecl, Result);
5313 Result += "\nstruct _objc_ivar {\n";
5314 Result += "\tchar *ivar_name;\n";
5315 Result += "\tchar *ivar_type;\n";
5316 Result += "\tint ivar_offset;\n";
5317 Result += "};\n";
5327 Result += "\nstatic struct {\n";
5328 Result += "\tint ivar_count;\n";
5329 Result += "\tstruct _objc_ivar ivar_list[";
5330 Result += utostr(NumIvars);
5331 Result += "];\n} _OBJC_INSTANCE_VARIABLES_";
5332 Result += IDecl->getNameAsString();
5333 Result += " __attribute__ ((used, section (\"__OBJC, __instance_vars\")))= "
5335 Result += utostr(NumIvars);
5336 Result += "\n";
5349 Result += "\t,{{\"";
5350 Result += IVI->getNameAsString();
5351 Result += "\", \"";
5355 Result += StrEncoding;
5356 Result += "\", ";
5357 RewriteIvarOffsetComputation(*IVI, Result);
5358 Result += "}\n";
5360 Result += "\t ,{\"";
5361 Result += IVI->getNameAsString();
5362 Result += "\", \"";
5366 Result += StrEncoding;
5367 Result += "\", ";
5368 RewriteIvarOffsetComputation(*IVI, Result);
5369 Result += "}\n";
5372 Result += "\t }\n};\n";
5398 true, "", IDecl->getName(), Result);
5402 false, "", IDecl->getName(), Result);
5406 "CLASS", CDecl->getName(), Result);
5426 Result += "\nstruct _objc_class {\n";
5427 Result += "\tstruct _objc_class *isa;\n";
5428 Result += "\tconst char *super_class_name;\n";
5429 Result += "\tchar *name;\n";
5430 Result += "\tlong version;\n";
5431 Result += "\tlong info;\n";
5432 Result += "\tlong instance_size;\n";
5433 Result += "\tstruct _objc_ivar_list *ivars;\n";
5434 Result += "\tstruct _objc_method_list *methods;\n";
5435 Result += "\tstruct objc_cache *cache;\n";
5436 Result += "\tstruct _objc_protocol_list *protocols;\n";
5437 Result += "\tconst char *ivar_layout;\n";
5438 Result += "\tstruct _objc_class_ext *ext;\n";
5439 Result += "};\n";
5452 Result += "\nstatic struct _objc_class _OBJC_METACLASS_";
5453 Result += CDecl->getNameAsString();
5454 Result += " __attribute__ ((used, section (\"__OBJC, __meta_class\")))= "
5456 Result += (RootClass ? RootClass->getNameAsString() : CDecl->getNameAsString());
5457 Result += "\"";
5460 Result += ", \"";
5461 Result += SuperClass->getNameAsString();
5462 Result += "\", \"";
5463 Result += CDecl->getNameAsString();
5464 Result += "\"";
5467 Result += ", 0, \"";
5468 Result += CDecl->getNameAsString();
5469 Result += "\"";
5473 Result += ", 0,2, sizeof(struct _objc_class), 0";
5475 Result += "\n\t, (struct _objc_method_list *)&_OBJC_CLASS_METHODS_";
5476 Result += IDecl->getNameAsString();
5477 Result += "\n";
5480 Result += ", 0\n";
5482 Result += "\t,0, (struct _objc_protocol_list *)&_OBJC_CLASS_PROTOCOLS_";
5483 Result += CDecl->getNameAsString();
5484 Result += ",0,0\n";
5487 Result += "\t,0,0,0,0\n";
5488 Result += "};\n";
5491 Result += "\nstatic struct _objc_class _OBJC_CLASS_";
5492 Result += CDecl->getNameAsString();
5493 Result += " __attribute__ ((used, section (\"__OBJC, __class\")))= "
5495 Result += CDecl->getNameAsString();
5497 Result += ", \"";
5498 Result += SuperClass->getNameAsString();
5499 Result += "\", \"";
5500 Result += CDecl->getNameAsString();
5501 Result += "\"";
5504 Result += ", 0, \"";
5505 Result += CDecl->getNameAsString();
5506 Result += "\"";
5509 Result += ", 0,1";
5511 Result += ",0";
5514 Result += ",sizeof(struct ";
5515 Result += CDecl->getNameAsString();
5517 Result += "_IMPL";
5518 Result += ")";
5521 Result += ", (struct _objc_ivar_list *)&_OBJC_INSTANCE_VARIABLES_";
5522 Result += CDecl->getNameAsString();
5523 Result += "\n\t";
5526 Result += ",0";
5528 Result += ", (struct _objc_method_list *)&_OBJC_INSTANCE_METHODS_";
5529 Result += CDecl->getNameAsString();
5530 Result += ", 0\n\t";
5533 Result += ",0,0";
5535 Result += ", (struct _objc_protocol_list*)&_OBJC_CLASS_PROTOCOLS_";
5536 Result += CDecl->getNameAsString();
5537 Result += ", 0,0\n";
5540 Result += ",0,0,0\n";
5541 Result += "};\n";
5544 void RewriteObjCFragileABI::RewriteMetaDataIntoBuffer(std::string &Result) {
5550 RewriteObjCClassMetaData(ClassImplementation[i], Result);
5554 RewriteObjCCategoryImplDecl(CategoryImplementation[i], Result);
5568 Result += "\nstruct _objc_symtab {\n";
5569 Result += "\tlong sel_ref_cnt;\n";
5570 Result += "\tSEL *refs;\n";
5571 Result += "\tshort cls_def_cnt;\n";
5572 Result += "\tshort cat_def_cnt;\n";
5573 Result += "\tvoid *defs[" + utostr(ClsDefCount + CatDefCount)+ "];\n";
5574 Result += "};\n\n";
5576 Result += "static struct _objc_symtab "
5578 Result += "\t0, 0, " + utostr(ClsDefCount)
5581 Result += "\t,&_OBJC_CLASS_";
5582 Result += ClassImplementation[i]->getNameAsString();
5583 Result += "\n";
5587 Result += "\t,&_OBJC_CATEGORY_";
5588 Result += CategoryImplementation[i]->getClassInterface()->getNameAsString();
5589 Result += "_";
5590 Result += CategoryImplementation[i]->getNameAsString();
5591 Result += "\n";
5594 Result += "};\n\n";
5607 Result += "\nstruct _objc_module {\n";
5608 Result += "\tlong version;\n";
5609 Result += "\tlong size;\n";
5610 Result += "\tconst char *name;\n";
5611 Result += "\tstruct _objc_symtab *symtab;\n";
5612 Result += "};\n\n";
5613 Result += "static struct _objc_module "
5615 Result += "\t" + utostr(OBJC_ABI_VERSION) +
5617 Result += "};\n\n";
5621 Result += "#pragma section(\".objc_protocol$B\",long,read,write)\n";
5622 Result += "#pragma data_seg(push, \".objc_protocol$B\")\n";
5624 Result += "static struct _objc_protocol *_POINTER_OBJC_PROTOCOL_";
5625 Result += ProtDecl->getNameAsString();
5626 Result += " = &_OBJC_PROTOCOL_";
5627 Result += ProtDecl->getNameAsString();
5628 Result += ";\n";
5630 Result += "#pragma data_seg(pop)\n\n";
5632 Result += "#pragma section(\".objc_module_info$B\",long,read,write)\n";
5633 Result += "#pragma data_seg(push, \".objc_module_info$B\")\n";
5634 Result += "static struct _objc_module *_POINTER_OBJC_MODULES = ";
5635 Result += "&_OBJC_MODULES;\n";
5636 Result += "#pragma data_seg(pop)\n\n";
5643 std::string &Result) {
5675 Result);
5680 Result);
5686 FullCategoryName, Result);
5702 Result += "\nstruct _objc_category {\n";
5703 Result += "\tchar *category_name;\n";
5704 Result += "\tchar *class_name;\n";
5705 Result += "\tstruct _objc_method_list *instance_methods;\n";
5706 Result += "\tstruct _objc_method_list *class_methods;\n";
5707 Result += "\tstruct _objc_protocol_list *protocols;\n";
5708 Result += "\tunsigned int size;\n";
5709 Result += "\tstruct _objc_property_list *instance_properties;\n";
5710 Result += "};\n";
5713 Result += "\nstatic struct _objc_category _OBJC_CATEGORY_";
5714 Result += FullCategoryName;
5715 Result += " __attribute__ ((used, section (\"__OBJC, __category\")))= {\n\t\"";
5716 Result += IDecl->getNameAsString();
5717 Result += "\"\n\t, \"";
5718 Result += ClassDecl->getNameAsString();
5719 Result += "\"\n";
5722 Result += "\t, (struct _objc_method_list *)"
5724 Result += FullCategoryName;
5725 Result += "\n";
5728 Result += "\t, 0\n";
5730 Result += "\t, (struct _objc_method_list *)"
5732 Result += FullCategoryName;
5733 Result += "\n";
5736 Result += "\t, 0\n";
5739 Result += "\t, (struct _objc_protocol_list *)&_OBJC_CATEGORY_PROTOCOLS_";
5740 Result += FullCategoryName;
5741 Result += "\n";
5744 Result += "\t, 0\n";
5745 Result += "\t, sizeof(struct _objc_category), 0\n};\n";
5756 std::string &Result) {
5766 Result += "\nstruct _objc_method {\n";
5767 Result += "\tSEL _cmd;\n";
5768 Result += "\tchar *method_types;\n";
5769 Result += "\tvoid *_imp;\n";
5770 Result += "};\n";
5784 Result += "\nstatic struct {\n";
5785 Result += "\tstruct _objc_method_list *next_method;\n";
5786 Result += "\tint method_count;\n";
5787 Result += "\tstruct _objc_method method_list[";
5788 Result += utostr(NumMethods);
5789 Result += "];\n} _OBJC_";
5790 Result += prefix;
5791 Result += IsInstanceMethod ? "INSTANCE" : "CLASS";
5792 Result += "_METHODS_";
5793 Result += ClassName;
5794 Result += " __attribute__ ((used, section (\"__OBJC, __";
5795 Result += IsInstanceMethod ? "inst" : "cls";
5796 Result += "_meth\")))= ";
5797 Result += "{\n\t0, " + utostr(NumMethods) + "\n";
5799 Result += "\t,{{(SEL)\"";
5800 Result += (*MethodBegin)->getSelector().getAsString().c_str();
5803 Result += "\", \"";
5804 Result += MethodTypeString;
5805 Result += "\", (void *)";
5806 Result += MethodInternalNames[*MethodBegin];
5807 Result += "}\n";
5809 Result += "\t ,{(SEL)\"";
5810 Result += (*MethodBegin)->getSelector().getAsString().c_str();
5813 Result += "\", \"";
5814 Result += MethodTypeString;
5815 Result += "\", (void *)";
5816 Result += MethodInternalNames[*MethodBegin];
5817 Result += "}\n";
5819 Result += "\t }\n};\n";