diff options
Diffstat (limited to 'Driver/RewriteBlocks.cpp')
-rw-r--r-- | Driver/RewriteBlocks.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Driver/RewriteBlocks.cpp b/Driver/RewriteBlocks.cpp index 11d7e36e6c..d07fb2c718 100644 --- a/Driver/RewriteBlocks.cpp +++ b/Driver/RewriteBlocks.cpp @@ -618,7 +618,7 @@ void RewriteBlocks::SynthesizeBlockLiterals(SourceLocation FunLocStart, void RewriteBlocks::InsertBlockLiteralsWithinFunction(FunctionDecl *FD) { SourceLocation FunLocStart = FD->getTypeSpecStartLoc(); - const char *FuncName = FD->getIdentifierName(); + const char *FuncName = FD->getNameAsCString(); SynthesizeBlockLiterals(FunLocStart, FuncName); } @@ -675,13 +675,13 @@ std::string RewriteBlocks::SynthesizeBlockCall(CallExpr *Exp) { const BlockPointerType *CPT = 0; if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Exp->getCallee())) { - closureName = DRE->getDecl()->getIdentifierName(); + closureName = DRE->getDecl()->getNameAsCString(); CPT = DRE->getType()->getAsBlockPointerType(); } else if (BlockDeclRefExpr *CDRE = dyn_cast<BlockDeclRefExpr>(Exp->getCallee())) { - closureName = CDRE->getDecl()->getIdentifierName(); + closureName = CDRE->getDecl()->getNameAsCString(); CPT = CDRE->getType()->getAsBlockPointerType(); } else if (MemberExpr *MExpr = dyn_cast<MemberExpr>(Exp->getCallee())) { - closureName = MExpr->getMemberDecl()->getIdentifierName(); + closureName = MExpr->getMemberDecl()->getNameAsCString(); CPT = MExpr->getType()->getAsBlockPointerType(); } else { assert(1 && "RewriteBlockClass: Bad type"); @@ -1110,7 +1110,7 @@ void RewriteBlocks::HandleDeclInMainFile(Decl *D) { // Do the rewrite, using S.size() which contains the rewritten size. ReplaceText(CBE->getLocStart(), S.size(), Init.c_str(), Init.size()); SynthesizeBlockLiterals(VD->getTypeSpecStartLoc(), - VD->getIdentifierName()); + VD->getNameAsCString()); } else if (CastExpr *CE = dyn_cast<CastExpr>(VD->getInit())) { RewriteCastExpr(CE); } |