diff options
-rw-r--r-- | lib/AST/ASTContext.cpp | 4 | ||||
-rw-r--r-- | lib/AST/DeclarationName.cpp | 6 | ||||
-rw-r--r-- | lib/AST/StmtDumper.cpp | 4 | ||||
-rw-r--r-- | lib/AST/StmtPrinter.cpp | 24 | ||||
-rw-r--r-- | lib/AST/Type.cpp | 6 | ||||
-rw-r--r-- | lib/Analysis/BasicStore.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/CGDecl.cpp | 8 |
8 files changed, 28 insertions, 28 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index b87b1f4f2e..e1b56ad6fb 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -1589,7 +1589,7 @@ void ASTContext::getObjCEncodingForPropertyDecl(const ObjCPropertyDecl *PD, if (SynthesizePID) { const ObjCIvarDecl *OID = SynthesizePID->getPropertyIvarDecl(); S += ",V"; - S += OID->getName(); + S += OID->getNameAsString(); } // FIXME: OBJCGC: weak & strong @@ -1695,7 +1695,7 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S, FieldDecl *FD = RDecl->getMember(i); if (NameFields) { S += '"'; - S += FD->getName(); + S += FD->getNameAsString(); S += '"'; } diff --git a/lib/AST/DeclarationName.cpp b/lib/AST/DeclarationName.cpp index ed4b7c6105..649b092db0 100644 --- a/lib/AST/DeclarationName.cpp +++ b/lib/AST/DeclarationName.cpp @@ -125,7 +125,7 @@ std::string DeclarationName::getAsString() const { case CXXConstructorName: { QualType ClassType = getCXXNameType(); if (const RecordType *ClassRec = ClassType->getAsRecordType()) - return ClassRec->getDecl()->getName(); + return ClassRec->getDecl()->getNameAsString(); return ClassType.getAsString(); } @@ -133,7 +133,7 @@ std::string DeclarationName::getAsString() const { std::string Result = "~"; QualType Type = getCXXNameType(); if (const RecordType *Rec = Type->getAsRecordType()) - Result += Rec->getDecl()->getName(); + Result += Rec->getDecl()->getNameAsString(); else Result += Type.getAsString(); return Result; @@ -160,7 +160,7 @@ std::string DeclarationName::getAsString() const { std::string Result = "operator "; QualType Type = getCXXNameType(); if (const RecordType *Rec = Type->getAsRecordType()) - Result += Rec->getDecl()->getName(); + Result += Rec->getDecl()->getNameAsString(); else Result += Type.getAsString(); return Result; diff --git a/lib/AST/StmtDumper.cpp b/lib/AST/StmtDumper.cpp index b73dc534dc..f11536f9c2 100644 --- a/lib/AST/StmtDumper.cpp +++ b/lib/AST/StmtDumper.cpp @@ -218,7 +218,7 @@ void StmtDumper::DumpDeclarator(Decl *D) { } } - std::string Name = VD->getName(); + std::string Name = VD->getNameAsString(); VD->getType().getAsStringInternal(Name); fprintf(F, "%s", Name.c_str()); @@ -296,7 +296,7 @@ void StmtDumper::VisitDeclRefExpr(DeclRefExpr *Node) { default: fprintf(F,"Decl"); break; } - fprintf(F, "='%s' %p", Node->getDecl()->getName().c_str(), + fprintf(F, "='%s' %p", Node->getDecl()->getNameAsString().c_str(), (void*)Node->getDecl()); } diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp index 8a7d3eb650..fcebdab05c 100644 --- a/lib/AST/StmtPrinter.cpp +++ b/lib/AST/StmtPrinter.cpp @@ -106,7 +106,7 @@ void StmtPrinter::PrintRawDecl(Decl *D) { // nodes are where they need to be. if (TypedefDecl *localType = dyn_cast<TypedefDecl>(D)) { OS << "typedef " << localType->getUnderlyingType().getAsString(); - OS << " " << localType->getName(); + OS << " " << localType->getNameAsString(); } else if (ValueDecl *VD = dyn_cast<ValueDecl>(D)) { // Emit storage class for vardecls. if (VarDecl *V = dyn_cast<VarDecl>(VD)) { @@ -120,7 +120,7 @@ void StmtPrinter::PrintRawDecl(Decl *D) { } } - std::string Name = VD->getName(); + std::string Name = VD->getNameAsString(); VD->getType().getAsStringInternal(Name); OS << Name; @@ -483,7 +483,7 @@ void StmtPrinter::VisitExpr(Expr *Node) { } void StmtPrinter::VisitDeclRefExpr(DeclRefExpr *Node) { - OS << Node->getDecl()->getName(); + OS << Node->getDecl()->getNameAsString(); } void StmtPrinter::VisitObjCIvarRefExpr(ObjCIvarRefExpr *Node) { @@ -491,7 +491,7 @@ void StmtPrinter::VisitObjCIvarRefExpr(ObjCIvarRefExpr *Node) { PrintExpr(Node->getBase()); OS << (Node->isArrow() ? "->" : "."); } - OS << Node->getDecl()->getName(); + OS << Node->getDecl()->getNameAsString(); } void StmtPrinter::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *Node) { @@ -658,7 +658,7 @@ bool StmtPrinter::PrintOffsetOfDesignator(Expr *E) { } else { MemberExpr *ME = cast<MemberExpr>(E); bool IsFirst = PrintOffsetOfDesignator(ME->getBase()); - OS << (IsFirst ? "" : ".") << ME->getMemberDecl()->getName(); + OS << (IsFirst ? "" : ".") << ME->getMemberDecl()->getNameAsString(); return false; } } @@ -705,7 +705,7 @@ void StmtPrinter::VisitMemberExpr(MemberExpr *Node) { FieldDecl *Field = Node->getMemberDecl(); assert(Field && "MemberExpr should alway reference a field!"); - OS << Field->getName(); + OS << Field->getNameAsString(); } void StmtPrinter::VisitExtVectorElementExpr(ExtVectorElementExpr *Node) { PrintExpr(Node->getBase()); @@ -984,15 +984,15 @@ void StmtPrinter::VisitObjCStringLiteral(ObjCStringLiteral *Node) { } void StmtPrinter::VisitObjCEncodeExpr(ObjCEncodeExpr *Node) { - OS << "@encode(" << Node->getEncodedType().getAsString() << ")"; + OS << "@encode(" << Node->getEncodedType().getAsString() << ')'; } void StmtPrinter::VisitObjCSelectorExpr(ObjCSelectorExpr *Node) { - OS << "@selector(" << Node->getSelector().getAsString() << ")"; + OS << "@selector(" << Node->getSelector().getAsString() << ')'; } void StmtPrinter::VisitObjCProtocolExpr(ObjCProtocolExpr *Node) { - OS << "@protocol(" << Node->getProtocol()->getName() << ")"; + OS << "@protocol(" << Node->getProtocol()->getNameAsString() << ')'; } void StmtPrinter::VisitObjCMessageExpr(ObjCMessageExpr *Mess) { @@ -1009,7 +1009,7 @@ void StmtPrinter::VisitObjCMessageExpr(ObjCMessageExpr *Mess) { if (i < selector.getNumArgs()) { if (i > 0) OS << ' '; if (selector.getIdentifierInfoForSlot(i)) - OS << selector.getIdentifierInfoForSlot(i)->getName() << ":"; + OS << selector.getIdentifierInfoForSlot(i)->getName() << ':'; else OS << ":"; } @@ -1039,7 +1039,7 @@ void StmtPrinter::VisitBlockExpr(BlockExpr *Node) { for (BlockDecl::param_iterator AI = BD->param_begin(), E = BD->param_end(); AI != E; ++AI) { if (AI != BD->param_begin()) OS << ", "; - ParamStr = (*AI)->getName(); + ParamStr = (*AI)->getNameAsString(); (*AI)->getType().getAsStringInternal(ParamStr); OS << ParamStr; } @@ -1054,7 +1054,7 @@ void StmtPrinter::VisitBlockExpr(BlockExpr *Node) { } void StmtPrinter::VisitBlockDeclRefExpr(BlockDeclRefExpr *Node) { - OS << Node->getDecl()->getName(); + OS << Node->getDecl()->getNameAsString(); } //===----------------------------------------------------------------------===// // Stmt method implementations diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 3898ba056b..6aa3c8eb38 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -1012,7 +1012,7 @@ void ObjCQualifiedInterfaceType::getAsStringInternal( std::string &InnerString) const { if (!InnerString.empty()) // Prefix the basic type, e.g. 'typedefname X'. InnerString = ' ' + InnerString; - std::string ObjCQIString = getDecl()->getName(); + std::string ObjCQIString = getDecl()->getNameAsString(); ObjCQIString += '<'; bool isFirst = true; for (qual_iterator I = qual_begin(), E = qual_end(); I != E; ++I) { @@ -1020,7 +1020,7 @@ void ObjCQualifiedInterfaceType::getAsStringInternal( isFirst = false; else ObjCQIString += ','; - ObjCQIString += (*I)->getName(); + ObjCQIString += (*I)->getNameAsString(); } ObjCQIString += '>'; InnerString = ObjCQIString + InnerString; @@ -1033,7 +1033,7 @@ void ObjCQualifiedIdType::getAsStringInternal(std::string &InnerString) const { ObjCQIString += '<'; int num = getNumProtocols(); for (int i = 0; i < num; i++) { - ObjCQIString += getProtocols(i)->getName(); + ObjCQIString += getProtocols(i)->getNameAsString(); if (i < num-1) ObjCQIString += ','; } diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp index ae6febff7b..7238d5bb23 100644 --- a/lib/Analysis/BasicStore.cpp +++ b/lib/Analysis/BasicStore.cpp @@ -433,7 +433,7 @@ void BasicStoreManager::print(Store store, std::ostream& Out, if (isFirst) isFirst = false; else Out << nl; - Out << ' ' << I.getKey()->getName() << " : "; + Out << ' ' << I.getKey()->getNameAsString() << " : "; I.getData().print(Out); } } diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 037bbb1a2a..1fc4143d60 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -716,7 +716,7 @@ void CodeGenFunction::EmitFunctionProlog(llvm::Function *Fn, // If this was structure was expand into multiple arguments then // we need to create a temporary and reconstruct it from the // arguments. - std::string Name(Arg->getName()); + std::string Name = Arg->getNameAsString(); llvm::Value *Temp = CreateTempAlloca(ConvertType(Ty), (Name + ".addr").c_str()); // FIXME: What are the right qualifiers here? diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index 77ef57750e..9352c35a81 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -91,7 +91,7 @@ CodeGenFunction::GenerateStaticBlockVarDecl(const VarDecl &D, std::string ContextName; if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(CurFuncDecl)) - ContextName = FD->getName(); + ContextName = FD->getNameAsString(); else if (isa<ObjCMethodDecl>(CurFuncDecl)) ContextName = std::string(CurFn->getNameStart(), CurFn->getNameStart() + CurFn->getNameLen()); @@ -101,7 +101,7 @@ CodeGenFunction::GenerateStaticBlockVarDecl(const VarDecl &D, llvm::GlobalValue *GV = new llvm::GlobalVariable(Init->getType(), false, llvm::GlobalValue::InternalLinkage, - Init, ContextName + Separator + D.getName(), + Init, ContextName + Separator +D.getNameAsString(), &CGM.getModule(), 0, Ty.getAddressSpace()); return GV; @@ -212,7 +212,7 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg) { const llvm::Type *LTy = ConvertType(Ty); if (LTy->isSingleValueType()) { // TODO: Alignment - std::string Name(D.getName()); + std::string Name = D.getNameAsString(); Name += ".addr"; DeclPtr = CreateTempAlloca(LTy, Name.c_str()); @@ -222,7 +222,7 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg) { // Otherwise, if this is an aggregate, just use the input pointer. DeclPtr = Arg; } - Arg->setName(D.getName()); + Arg->setName(D.getNameAsString()); } llvm::Value *&DMEntry = LocalDeclMap[&D]; |