@@ -465,15 +465,15 @@ namespace {
465
465
466
466
std::string SynthesizeByrefCopyDestroyHelper (VarDecl *VD, int flag);
467
467
std::string SynthesizeBlockHelperFuncs (BlockExpr *CE, int i,
468
- StringRef funcName, std::string Tag);
469
- std::string SynthesizeBlockFunc (BlockExpr *CE, int i,
470
- StringRef funcName, std::string Tag);
471
- std::string SynthesizeBlockImpl (BlockExpr *CE,
472
- std::string Tag, std::string Desc);
473
- std::string SynthesizeBlockDescriptor ( std::string DescTag,
474
- std::string ImplTag ,
475
- int i, StringRef funcName ,
476
- unsigned hasCopy);
468
+ StringRef funcName,
469
+ const std::string &Tag);
470
+ std::string SynthesizeBlockFunc (BlockExpr *CE, int i, StringRef funcName,
471
+ const std::string &Tag);
472
+ std::string SynthesizeBlockImpl (BlockExpr *CE, const std::string &Tag,
473
+ const std::string &Desc);
474
+ std::string SynthesizeBlockDescriptor ( const std::string &DescTag ,
475
+ const std::string &ImplTag, int i ,
476
+ StringRef funcName, unsigned hasCopy);
477
477
Stmt *SynthesizeBlockCall (CallExpr *Exp, const Expr* BlockExp);
478
478
void SynthesizeBlockLiterals (SourceLocation FunLocStart,
479
479
StringRef FunName);
@@ -4037,7 +4037,7 @@ static bool HasLocalVariableExternalStorage(ValueDecl *VD) {
4037
4037
4038
4038
std::string RewriteModernObjC::SynthesizeBlockFunc (BlockExpr *CE, int i,
4039
4039
StringRef funcName,
4040
- std::string Tag) {
4040
+ const std::string & Tag) {
4041
4041
const FunctionType *AFT = CE->getFunctionType ();
4042
4042
QualType RT = AFT->getReturnType ();
4043
4043
std::string StructRef = " struct " + Tag;
@@ -4131,9 +4131,8 @@ std::string RewriteModernObjC::SynthesizeBlockFunc(BlockExpr *CE, int i,
4131
4131
return S;
4132
4132
}
4133
4133
4134
- std::string RewriteModernObjC::SynthesizeBlockHelperFuncs (BlockExpr *CE, int i,
4135
- StringRef funcName,
4136
- std::string Tag) {
4134
+ std::string RewriteModernObjC::SynthesizeBlockHelperFuncs (
4135
+ BlockExpr *CE, int i, StringRef funcName, const std::string &Tag) {
4137
4136
std::string StructRef = " struct " + Tag;
4138
4137
std::string S = " static void __" ;
4139
4138
@@ -4175,8 +4174,9 @@ std::string RewriteModernObjC::SynthesizeBlockHelperFuncs(BlockExpr *CE, int i,
4175
4174
return S;
4176
4175
}
4177
4176
4178
- std::string RewriteModernObjC::SynthesizeBlockImpl (BlockExpr *CE, std::string Tag,
4179
- std::string Desc) {
4177
+ std::string RewriteModernObjC::SynthesizeBlockImpl (BlockExpr *CE,
4178
+ const std::string &Tag,
4179
+ const std::string &Desc) {
4180
4180
std::string S = " \n struct " + Tag;
4181
4181
std::string Constructor = " " + Tag;
4182
4182
@@ -4290,10 +4290,9 @@ std::string RewriteModernObjC::SynthesizeBlockImpl(BlockExpr *CE, std::string Ta
4290
4290
return S;
4291
4291
}
4292
4292
4293
- std::string RewriteModernObjC::SynthesizeBlockDescriptor (std::string DescTag,
4294
- std::string ImplTag, int i,
4295
- StringRef FunName,
4296
- unsigned hasCopy) {
4293
+ std::string RewriteModernObjC::SynthesizeBlockDescriptor (
4294
+ const std::string &DescTag, const std::string &ImplTag, int i,
4295
+ StringRef FunName, unsigned hasCopy) {
4297
4296
std::string S = " \n static struct " + DescTag;
4298
4297
4299
4298
S += " {\n size_t reserved;\n " ;
0 commit comments