diff options
Diffstat (limited to 'lib/Frontend/RewriteObjC.cpp')
-rw-r--r-- | lib/Frontend/RewriteObjC.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp index 79ae08cee5..55f0b405a9 100644 --- a/lib/Frontend/RewriteObjC.cpp +++ b/lib/Frontend/RewriteObjC.cpp @@ -944,9 +944,10 @@ void RewriteObjC::RewriteObjCMethodDecl(ObjCMethodDecl *OMD, if (isTopLevelBlockPointerType(PDecl->getType())) { // Make sure we convert "t (^)(...)" to "t (*)(...)". const BlockPointerType *BPT = PDecl->getType()->getAsBlockPointerType(); - Context->getPointerType(BPT->getPointeeType()).getAsStringInternal(Name); + Context->getPointerType(BPT->getPointeeType()).getAsStringInternal(Name, + Context->PrintingPolicy); } else - PDecl->getType().getAsStringInternal(Name); + PDecl->getType().getAsStringInternal(Name, Context->PrintingPolicy); ResultStr += Name; } } @@ -3600,7 +3601,7 @@ std::string RewriteObjC::SynthesizeBlockFunc(BlockExpr *CE, int i, E = BD->param_end(); AI != E; ++AI) { if (AI != BD->param_begin()) S += ", "; ParamStr = (*AI)->getNameAsString(); - (*AI)->getType().getAsStringInternal(ParamStr); + (*AI)->getType().getAsStringInternal(ParamStr, Context->PrintingPolicy); S += ParamStr; } if (FT->isVariadic()) { @@ -3617,7 +3618,8 @@ std::string RewriteObjC::SynthesizeBlockFunc(BlockExpr *CE, int i, E = BlockByRefDecls.end(); I != E; ++I) { S += " "; std::string Name = (*I)->getNameAsString(); - Context->getPointerType((*I)->getType()).getAsStringInternal(Name); + Context->getPointerType((*I)->getType()).getAsStringInternal(Name, + Context->PrintingPolicy); S += Name + " = __cself->" + (*I)->getNameAsString() + "; // bound by ref\n"; } // Next, emit a declaration for all "by copy" declarations. @@ -3638,7 +3640,7 @@ std::string RewriteObjC::SynthesizeBlockFunc(BlockExpr *CE, int i, if (isTopLevelBlockPointerType((*I)->getType())) S += "struct __block_impl *"; else - (*I)->getType().getAsStringInternal(Name); + (*I)->getType().getAsStringInternal(Name, Context->PrintingPolicy); S += Name + " = __cself->" + (*I)->getNameAsString() + "; // bound by copy\n"; } std::string RewrittenStr = RewrittenBlockExprs[CE]; @@ -3719,8 +3721,8 @@ std::string RewriteObjC::SynthesizeBlockImpl(BlockExpr *CE, std::string Tag, S += "struct __block_impl *"; Constructor += ", void *" + ArgName; } else { - (*I)->getType().getAsStringInternal(FieldName); - (*I)->getType().getAsStringInternal(ArgName); + (*I)->getType().getAsStringInternal(FieldName, Context->PrintingPolicy); + (*I)->getType().getAsStringInternal(ArgName, Context->PrintingPolicy); Constructor += ", " + ArgName; } S += FieldName + ";\n"; @@ -3745,8 +3747,10 @@ std::string RewriteObjC::SynthesizeBlockImpl(BlockExpr *CE, std::string Tag, S += "struct __block_impl *"; Constructor += ", void *" + ArgName; } else { - Context->getPointerType((*I)->getType()).getAsStringInternal(FieldName); - Context->getPointerType((*I)->getType()).getAsStringInternal(ArgName); + Context->getPointerType((*I)->getType()).getAsStringInternal(FieldName, + Context->PrintingPolicy); + Context->getPointerType((*I)->getType()).getAsStringInternal(ArgName, + Context->PrintingPolicy); Constructor += ", " + ArgName; } S += FieldName + "; // by ref\n"; |