diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-12 19:30:44 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-12 19:30:44 +0000 |
commit | cfa88f893915ceb8ae4ce2f17c46c24a4d67502f (patch) | |
tree | 483833afb997605d25c29455d4aaed40bd95f1da /lib/AST | |
parent | 9cd506b7c983829a33ae7ac1297228d146c58a69 (diff) |
Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST')
-rw-r--r-- | lib/AST/ASTDiagnostic.cpp | 4 | ||||
-rw-r--r-- | lib/AST/ASTDumper.cpp | 2 | ||||
-rw-r--r-- | lib/AST/ASTImporter.cpp | 30 | ||||
-rw-r--r-- | lib/AST/CommentDumper.cpp | 2 | ||||
-rw-r--r-- | lib/AST/CommentSema.cpp | 6 | ||||
-rw-r--r-- | lib/AST/Decl.cpp | 14 | ||||
-rw-r--r-- | lib/AST/DeclBase.cpp | 8 | ||||
-rw-r--r-- | lib/AST/DeclTemplate.cpp | 4 | ||||
-rw-r--r-- | lib/AST/DumpXML.cpp | 4 | ||||
-rw-r--r-- | lib/AST/Expr.cpp | 6 | ||||
-rw-r--r-- | lib/AST/ExprCXX.cpp | 2 | ||||
-rw-r--r-- | lib/AST/ExprConstant.cpp | 29 | ||||
-rw-r--r-- | lib/AST/ItaniumMangle.cpp | 2 |
13 files changed, 56 insertions, 57 deletions
diff --git a/lib/AST/ASTDiagnostic.cpp b/lib/AST/ASTDiagnostic.cpp index 4b9ecdedd0..514633ab5b 100644 --- a/lib/AST/ASTDiagnostic.cpp +++ b/lib/AST/ASTDiagnostic.cpp @@ -396,7 +396,7 @@ class TemplateDiff { QualType ToType; /// Str - Storage for the output stream. - llvm::SmallString<128> Str; + SmallString<128> Str; /// OS - The stream used to construct the output strings. llvm::raw_svector_ostream OS; @@ -452,7 +452,7 @@ class TemplateDiff { }; /// FlatTree - A flattened tree used to store the DiffNodes. - llvm::SmallVector<DiffNode, 16> FlatTree; + SmallVector<DiffNode, 16> FlatTree; /// CurrentNode - The index of the current node being used. unsigned CurrentNode; diff --git a/lib/AST/ASTDumper.cpp b/lib/AST/ASTDumper.cpp index c0180033ed..0873825ea4 100644 --- a/lib/AST/ASTDumper.cpp +++ b/lib/AST/ASTDumper.cpp @@ -521,7 +521,7 @@ void ASTDumper::VisitFunctionDecl(FunctionDecl *D) { D->getTemplateSpecializationInfo()) dumpTemplateArgumentList(*FTSI->TemplateArguments); - for (llvm::ArrayRef<NamedDecl*>::iterator + for (ArrayRef<NamedDecl *>::iterator I = D->getDeclsInPrototypeScope().begin(), E = D->getDeclsInPrototypeScope().end(); I != E; ++I) dumpDecl(*I); diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp index 933375b129..9bfaa13ddd 100644 --- a/lib/AST/ASTImporter.cpp +++ b/lib/AST/ASTImporter.cpp @@ -2213,7 +2213,7 @@ Decl *ASTNodeImporter::VisitNamespaceDecl(NamespaceDecl *D) { MergeWithNamespace = cast<NamespaceDecl>(DC)->getAnonymousNamespace(); } else { SmallVector<NamedDecl *, 4> ConflictingDecls; - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(Name, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (!FoundDecls[I]->isInIdentifierNamespace(Decl::IDNS_Namespace)) @@ -2276,7 +2276,7 @@ Decl *ASTNodeImporter::VisitTypedefNameDecl(TypedefNameDecl *D, bool IsAlias) { if (!DC->isFunctionOrMethod()) { SmallVector<NamedDecl *, 4> ConflictingDecls; unsigned IDNS = Decl::IDNS_Ordinary; - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(Name, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (!FoundDecls[I]->isInIdentifierNamespace(IDNS)) @@ -2356,7 +2356,7 @@ Decl *ASTNodeImporter::VisitEnumDecl(EnumDecl *D) { // We may already have an enum of the same name; try to find and match it. if (!DC->isFunctionOrMethod() && SearchName) { SmallVector<NamedDecl *, 4> ConflictingDecls; - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(SearchName, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (!FoundDecls[I]->isInIdentifierNamespace(IDNS)) @@ -2442,7 +2442,7 @@ Decl *ASTNodeImporter::VisitRecordDecl(RecordDecl *D) { RecordDecl *AdoptDecl = 0; if (!DC->isFunctionOrMethod()) { SmallVector<NamedDecl *, 4> ConflictingDecls; - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(SearchName, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (!FoundDecls[I]->isInIdentifierNamespace(IDNS)) @@ -2549,7 +2549,7 @@ Decl *ASTNodeImporter::VisitEnumConstantDecl(EnumConstantDecl *D) { if (!LexicalDC->isFunctionOrMethod()) { SmallVector<NamedDecl *, 4> ConflictingDecls; unsigned IDNS = Decl::IDNS_Ordinary; - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(Name, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (!FoundDecls[I]->isInIdentifierNamespace(IDNS)) @@ -2601,7 +2601,7 @@ Decl *ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) { if (!LexicalDC->isFunctionOrMethod()) { SmallVector<NamedDecl *, 4> ConflictingDecls; unsigned IDNS = Decl::IDNS_Ordinary; - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(Name, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (!FoundDecls[I]->isInIdentifierNamespace(IDNS)) @@ -2811,7 +2811,7 @@ Decl *ASTNodeImporter::VisitFieldDecl(FieldDecl *D) { return 0; // Determine whether we've already imported this field. - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(Name, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (FieldDecl *FoundField = dyn_cast<FieldDecl>(FoundDecls[I])) { @@ -2867,7 +2867,7 @@ Decl *ASTNodeImporter::VisitIndirectFieldDecl(IndirectFieldDecl *D) { return 0; // Determine whether we've already imported this field. - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(Name, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (IndirectFieldDecl *FoundField @@ -2932,7 +2932,7 @@ Decl *ASTNodeImporter::VisitObjCIvarDecl(ObjCIvarDecl *D) { return 0; // Determine whether we've already imported this ivar - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(Name, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (ObjCIvarDecl *FoundIvar = dyn_cast<ObjCIvarDecl>(FoundDecls[I])) { @@ -2987,7 +2987,7 @@ Decl *ASTNodeImporter::VisitVarDecl(VarDecl *D) { VarDecl *MergeWithVar = 0; SmallVector<NamedDecl *, 4> ConflictingDecls; unsigned IDNS = Decl::IDNS_Ordinary; - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(Name, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (!FoundDecls[I]->isInIdentifierNamespace(IDNS)) @@ -3163,7 +3163,7 @@ Decl *ASTNodeImporter::VisitObjCMethodDecl(ObjCMethodDecl *D) { if (ImportDeclParts(D, DC, LexicalDC, Name, Loc)) return 0; - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(Name, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (ObjCMethodDecl *FoundMethod = dyn_cast<ObjCMethodDecl>(FoundDecls[I])) { @@ -3410,7 +3410,7 @@ Decl *ASTNodeImporter::VisitObjCProtocolDecl(ObjCProtocolDecl *D) { return 0; ObjCProtocolDecl *MergeWithProtocol = 0; - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(Name, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (!FoundDecls[I]->isInIdentifierNamespace(Decl::IDNS_ObjCProtocol)) @@ -3557,7 +3557,7 @@ Decl *ASTNodeImporter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) { // Look for an existing interface with the same name. ObjCInterfaceDecl *MergeWithIface = 0; - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(Name, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (!FoundDecls[I]->isInIdentifierNamespace(Decl::IDNS_Ordinary)) @@ -3709,7 +3709,7 @@ Decl *ASTNodeImporter::VisitObjCPropertyDecl(ObjCPropertyDecl *D) { return 0; // Check whether we have already imported this property. - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(Name, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (ObjCPropertyDecl *FoundProp @@ -3942,7 +3942,7 @@ Decl *ASTNodeImporter::VisitClassTemplateDecl(ClassTemplateDecl *D) { // We may already have a template of the same name; try to find and match it. if (!DC->isFunctionOrMethod()) { SmallVector<NamedDecl *, 4> ConflictingDecls; - llvm::SmallVector<NamedDecl *, 2> FoundDecls; + SmallVector<NamedDecl *, 2> FoundDecls; DC->localUncachedLookup(Name, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (!FoundDecls[I]->isInIdentifierNamespace(Decl::IDNS_Ordinary)) diff --git a/lib/AST/CommentDumper.cpp b/lib/AST/CommentDumper.cpp index 19d24b2f3a..bd8987203f 100644 --- a/lib/AST/CommentDumper.cpp +++ b/lib/AST/CommentDumper.cpp @@ -244,7 +244,7 @@ void CommentDumper::visitFullComment(const FullComment *C) { } // unnamed namespace -void Comment::dump(llvm::raw_ostream &OS, const CommandTraits *Traits, +void Comment::dump(raw_ostream &OS, const CommandTraits *Traits, const SourceManager *SM) const { const FullComment *FC = dyn_cast<FullComment>(this); CommentDumper D(llvm::errs(), Traits, SM, FC); diff --git a/lib/AST/CommentSema.cpp b/lib/AST/CommentSema.cpp index 44536727cb..590429809b 100644 --- a/lib/AST/CommentSema.cpp +++ b/lib/AST/CommentSema.cpp @@ -560,11 +560,11 @@ void Sema::resolveParamCommandIndexes(const FullComment *FC) { return; } - llvm::SmallVector<ParamCommandComment *, 8> UnresolvedParamCommands; + SmallVector<ParamCommandComment *, 8> UnresolvedParamCommands; // Comment AST nodes that correspond to \c ParamVars for which we have // found a \\param command or NULL if no documentation was found so far. - llvm::SmallVector<ParamCommandComment *, 8> ParamVarDocs; + SmallVector<ParamCommandComment *, 8> ParamVarDocs; ArrayRef<const ParmVarDecl *> ParamVars = getParamVars(); ParamVarDocs.resize(ParamVars.size(), NULL); @@ -597,7 +597,7 @@ void Sema::resolveParamCommandIndexes(const FullComment *FC) { } // Find parameter declarations that have no corresponding \\param. - llvm::SmallVector<const ParmVarDecl *, 8> OrphanedParamDecls; + SmallVector<const ParmVarDecl *, 8> OrphanedParamDecls; for (unsigned i = 0, e = ParamVarDocs.size(); i != e; ++i) { if (!ParamVarDocs[i]) OrphanedParamDecls.push_back(ParamVars[i]); diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index aeffd0a240..103ac1bd4a 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1454,12 +1454,12 @@ EvaluatedStmt *VarDecl::ensureEvaluatedStmt() const { } APValue *VarDecl::evaluateValue() const { - llvm::SmallVector<PartialDiagnosticAt, 8> Notes; + SmallVector<PartialDiagnosticAt, 8> Notes; return evaluateValue(Notes); } APValue *VarDecl::evaluateValue( - llvm::SmallVectorImpl<PartialDiagnosticAt> &Notes) const { + SmallVectorImpl<PartialDiagnosticAt> &Notes) const { EvaluatedStmt *Eval = ensureEvaluatedStmt(); // We only produce notes indicating why an initializer is non-constant the @@ -1517,7 +1517,7 @@ bool VarDecl::checkInitIsICE() const { // In C++11, evaluate the initializer to check whether it's a constant // expression. if (getASTContext().getLangOpts().CPlusPlus11) { - llvm::SmallVector<PartialDiagnosticAt, 8> Notes; + SmallVector<PartialDiagnosticAt, 8> Notes; evaluateValue(Notes); return Eval->IsICE; } @@ -1899,7 +1899,7 @@ unsigned FunctionDecl::getNumParams() const { } void FunctionDecl::setParams(ASTContext &C, - llvm::ArrayRef<ParmVarDecl *> NewParamInfo) { + ArrayRef<ParmVarDecl *> NewParamInfo) { assert(ParamInfo == 0 && "Already has param info!"); assert(NewParamInfo.size() == getNumParams() && "Parameter count mismatch!"); @@ -1910,13 +1910,13 @@ void FunctionDecl::setParams(ASTContext &C, } } -void FunctionDecl::setDeclsInPrototypeScope(llvm::ArrayRef<NamedDecl *> NewDecls) { +void FunctionDecl::setDeclsInPrototypeScope(ArrayRef<NamedDecl *> NewDecls) { assert(DeclsInPrototypeScope.empty() && "Already has prototype decls!"); if (!NewDecls.empty()) { NamedDecl **A = new (getASTContext()) NamedDecl*[NewDecls.size()]; std::copy(NewDecls.begin(), NewDecls.end(), A); - DeclsInPrototypeScope = llvm::ArrayRef<NamedDecl*>(A, NewDecls.size()); + DeclsInPrototypeScope = ArrayRef<NamedDecl *>(A, NewDecls.size()); } } @@ -2840,7 +2840,7 @@ void RecordDecl::LoadFieldsFromExternalStorage() const { // BlockDecl Implementation //===----------------------------------------------------------------------===// -void BlockDecl::setParams(llvm::ArrayRef<ParmVarDecl *> NewParamInfo) { +void BlockDecl::setParams(ArrayRef<ParmVarDecl *> NewParamInfo) { assert(ParamInfo == 0 && "Already has param info!"); // Zero params -> null pointer. diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index d8b63611fd..27a91cb7e6 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -875,7 +875,7 @@ DeclContext *DeclContext::getPrimaryContext() { } void -DeclContext::collectAllContexts(llvm::SmallVectorImpl<DeclContext *> &Contexts){ +DeclContext::collectAllContexts(SmallVectorImpl<DeclContext *> &Contexts){ Contexts.clear(); if (DeclKind != Decl::Namespace) { @@ -1130,7 +1130,7 @@ StoredDeclsMap *DeclContext::buildLookup() { if (!LookupPtr.getInt()) return LookupPtr.getPointer(); - llvm::SmallVector<DeclContext *, 2> Contexts; + SmallVector<DeclContext *, 2> Contexts; collectAllContexts(Contexts); for (unsigned I = 0, N = Contexts.size(); I != N; ++I) buildLookupImpl(Contexts[I]); @@ -1203,8 +1203,8 @@ DeclContext::lookup(DeclarationName Name) { return I->second.getLookupResult(); } -void DeclContext::localUncachedLookup(DeclarationName Name, - llvm::SmallVectorImpl<NamedDecl *> &Results) { +void DeclContext::localUncachedLookup(DeclarationName Name, + SmallVectorImpl<NamedDecl *> &Results) { Results.clear(); // If there's no external storage, just perform a normal lookup and copy diff --git a/lib/AST/DeclTemplate.cpp b/lib/AST/DeclTemplate.cpp index 98226b0708..63616e064a 100644 --- a/lib/AST/DeclTemplate.cpp +++ b/lib/AST/DeclTemplate.cpp @@ -132,7 +132,7 @@ RedeclarableTemplateDecl::CommonBase *RedeclarableTemplateDecl::getCommonPtr() { if (!Common) { // Walk the previous-declaration chain until we either find a declaration // with a common pointer or we run out of previous declarations. - llvm::SmallVector<RedeclarableTemplateDecl *, 2> PrevDecls; + SmallVector<RedeclarableTemplateDecl *, 2> PrevDecls; for (RedeclarableTemplateDecl *Prev = getPreviousDecl(); Prev; Prev = Prev->getPreviousDecl()) { if (Prev->Common) { @@ -620,7 +620,7 @@ TemplateTemplateParmDecl::Create(const ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, unsigned P, IdentifierInfo *Id, TemplateParameterList *Params, - llvm::ArrayRef<TemplateParameterList*> Expansions) { + ArrayRef<TemplateParameterList *> Expansions) { void *Mem = C.Allocate(sizeof(TemplateTemplateParmDecl) + sizeof(TemplateParameterList*) * Expansions.size()); return new (Mem) TemplateTemplateParmDecl(DC, L, D, P, Id, Params, diff --git a/lib/AST/DumpXML.cpp b/lib/AST/DumpXML.cpp index ce4e21f90b..1e7523f3b9 100644 --- a/lib/AST/DumpXML.cpp +++ b/lib/AST/DumpXML.cpp @@ -499,8 +499,8 @@ struct XMLDumper : public XMLDeclVisitor<XMLDumper>, for (FunctionDecl::param_iterator I = D->param_begin(), E = D->param_end(); I != E; ++I) dispatch(*I); - for (llvm::ArrayRef<NamedDecl*>::iterator - I = D->getDeclsInPrototypeScope().begin(), E = D->getDeclsInPrototypeScope().end(); + for (ArrayRef<NamedDecl *>::iterator I = D->getDeclsInPrototypeScope().begin(), + E = D->getDeclsInPrototypeScope().end(); I != E; ++I) dispatch(*I); if (D->doesThisDeclarationHaveABody()) diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 5689d9cae4..45f61fa5c2 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -2566,7 +2566,7 @@ bool Expr::isImplicitCXXThis() const { /// hasAnyTypeDependentArguments - Determines if any of the expressions /// in Exprs is type-dependent. -bool Expr::hasAnyTypeDependentArguments(llvm::ArrayRef<Expr *> Exprs) { +bool Expr::hasAnyTypeDependentArguments(ArrayRef<Expr *> Exprs) { for (unsigned I = 0; I < Exprs.size(); ++I) if (Exprs[I]->isTypeDependent()) return true; @@ -3884,7 +3884,7 @@ Stmt::child_range ObjCMessageExpr::children() { reinterpret_cast<Stmt **>(getArgs() + getNumArgs())); } -ObjCArrayLiteral::ObjCArrayLiteral(llvm::ArrayRef<Expr *> Elements, +ObjCArrayLiteral::ObjCArrayLiteral(ArrayRef<Expr *> Elements, QualType T, ObjCMethodDecl *Method, SourceRange SR) : Expr(ObjCArrayLiteralClass, T, VK_RValue, OK_Ordinary, @@ -3905,7 +3905,7 @@ ObjCArrayLiteral::ObjCArrayLiteral(llvm::ArrayRef<Expr *> Elements, } ObjCArrayLiteral *ObjCArrayLiteral::Create(ASTContext &C, - llvm::ArrayRef<Expr *> Elements, + ArrayRef<Expr *> Elements, QualType T, ObjCMethodDecl * Method, SourceRange SR) { void *Mem = C.Allocate(sizeof(ObjCArrayLiteral) diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp index e1977d803b..4b520e4fdf 100644 --- a/lib/AST/ExprCXX.cpp +++ b/lib/AST/ExprCXX.cpp @@ -1339,7 +1339,7 @@ FunctionParmPackExpr::FunctionParmPackExpr(QualType T, ParmVarDecl *ParamPack, FunctionParmPackExpr * FunctionParmPackExpr::Create(ASTContext &Context, QualType T, ParmVarDecl *ParamPack, SourceLocation NameLoc, - llvm::ArrayRef<Decl*> Params) { + ArrayRef<Decl *> Params) { return new (Context.Allocate(sizeof(FunctionParmPackExpr) + sizeof(ParmVarDecl*) * Params.size())) FunctionParmPackExpr(T, ParamPack, NameLoc, Params.size(), Params.data()); diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 622f37b178..9965e1288b 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -318,7 +318,7 @@ namespace { OptionalDiagnostic &operator<<(const APSInt &I) { if (Diag) { - llvm::SmallVector<char, 32> Buffer; + SmallVector<char, 32> Buffer; I.toString(Buffer); *Diag << StringRef(Buffer.data(), Buffer.size()); } @@ -327,7 +327,7 @@ namespace { OptionalDiagnostic &operator<<(const APFloat &F) { if (Diag) { - llvm::SmallVector<char, 32> Buffer; + SmallVector<char, 32> Buffer; F.toString(Buffer); *Diag << StringRef(Buffer.data(), Buffer.size()); } @@ -535,8 +535,7 @@ namespace { public: SpeculativeEvaluationRAII(EvalInfo &Info, - llvm::SmallVectorImpl<PartialDiagnosticAt> - *NewDiag = 0) + SmallVectorImpl<PartialDiagnosticAt> *NewDiag = 0) : Info(Info), Old(Info.EvalStatus) { Info.EvalStatus.Diag = NewDiag; } @@ -587,7 +586,7 @@ CallStackFrame::~CallStackFrame() { } /// Produce a string describing the given constexpr call. -static void describeCall(CallStackFrame *Frame, llvm::raw_ostream &Out) { +static void describeCall(CallStackFrame *Frame, raw_ostream &Out) { unsigned ArgIndex = 0; bool IsMemberCall = isa<CXXMethodDecl>(Frame->Callee) && !isa<CXXConstructorDecl>(Frame->Callee) && @@ -635,7 +634,7 @@ void EvalInfo::addCallStack(unsigned Limit) { continue; } - llvm::SmallVector<char, 128> Buffer; + SmallVector<char, 128> Buffer; llvm::raw_svector_ostream Out(Buffer); describeCall(Frame, Out); addDiag(Frame->CallLoc, diag::note_constexpr_call_here) << Out.str(); @@ -1463,7 +1462,7 @@ static bool EvaluateVarDeclInit(EvalInfo &Info, const Expr *E, // Check that we can fold the initializer. In C++, we will have already done // this in the cases where it matters for conformance. - llvm::SmallVector<PartialDiagnosticAt, 8> Notes; + SmallVector<PartialDiagnosticAt, 8> Notes; if (!VD->evaluateValue(Notes)) { Info.Diag(E, diag::note_constexpr_var_init_non_constant, Notes.size() + 1) << VD; @@ -2312,7 +2311,7 @@ private: // Speculatively evaluate both arms. { - llvm::SmallVector<PartialDiagnosticAt, 8> Diag; + SmallVector<PartialDiagnosticAt, 8> Diag; SpeculativeEvaluationRAII Speculate(Info, &Diag); StmtVisitorTy::Visit(E->getFalseExpr()); @@ -2483,7 +2482,7 @@ public: const FunctionDecl *FD = 0; LValue *This = 0, ThisVal; - llvm::ArrayRef<const Expr*> Args(E->getArgs(), E->getNumArgs()); + ArrayRef<const Expr *> Args(E->getArgs(), E->getNumArgs()); bool HasQualifier = false; // Extract function decl and 'this' pointer from the callee. @@ -3488,7 +3487,7 @@ bool RecordExprEvaluator::VisitCXXConstructExpr(const CXXConstructExpr *E) { if (ZeroInit && !ZeroInitialization(E)) return false; - llvm::ArrayRef<const Expr*> Args(E->getArgs(), E->getNumArgs()); + ArrayRef<const Expr *> Args(E->getArgs(), E->getNumArgs()); return HandleConstructorCall(E->getExprLoc(), This, Args, cast<CXXConstructorDecl>(Definition), Info, Result); @@ -3899,7 +3898,7 @@ bool ArrayExprEvaluator::VisitCXXConstructExpr(const CXXConstructExpr *E) { return false; } - llvm::ArrayRef<const Expr*> Args(E->getArgs(), E->getNumArgs()); + ArrayRef<const Expr *> Args(E->getArgs(), E->getNumArgs()); return HandleConstructorCall(E->getExprLoc(), Subobject, Args, cast<CXXConstructorDecl>(Definition), Info, *Value); @@ -6320,7 +6319,7 @@ bool Expr::EvaluateAsLValue(EvalResult &Result, const ASTContext &Ctx) const { bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx, const VarDecl *VD, - llvm::SmallVectorImpl<PartialDiagnosticAt> &Notes) const { + SmallVectorImpl<PartialDiagnosticAt> &Notes) const { // FIXME: Evaluating initializers for large array and record types can cause // performance problems. Only do so in C++11 for now. if (isRValue() && (getType()->isArrayType() || getType()->isRecordType()) && @@ -6365,7 +6364,7 @@ bool Expr::isEvaluatable(const ASTContext &Ctx) const { } APSInt Expr::EvaluateKnownConstInt(const ASTContext &Ctx, - llvm::SmallVectorImpl<PartialDiagnosticAt> *Diag) const { + SmallVectorImpl<PartialDiagnosticAt> *Diag) const { EvalResult EvalResult; EvalResult.Diag = Diag; bool Result = EvaluateAsRValue(EvalResult, Ctx); @@ -6843,7 +6842,7 @@ bool Expr::isCXX11ConstantExpr(ASTContext &Ctx, APValue *Result, // Build evaluation settings. Expr::EvalStatus Status; - llvm::SmallVector<PartialDiagnosticAt, 8> Diags; + SmallVector<PartialDiagnosticAt, 8> Diags; Status.Diag = &Diags; EvalInfo Info(Ctx, Status); @@ -6862,7 +6861,7 @@ bool Expr::isCXX11ConstantExpr(ASTContext &Ctx, APValue *Result, } bool Expr::isPotentialConstantExpr(const FunctionDecl *FD, - llvm::SmallVectorImpl< + SmallVectorImpl< PartialDiagnosticAt> &Diags) { // FIXME: It would be useful to check constexpr function templates, but at the // moment the constant expression evaluator cannot cope with the non-rigorous diff --git a/lib/AST/ItaniumMangle.cpp b/lib/AST/ItaniumMangle.cpp index b6077ec134..65e630eb25 100644 --- a/lib/AST/ItaniumMangle.cpp +++ b/lib/AST/ItaniumMangle.cpp @@ -657,7 +657,7 @@ void CXXNameMangler::mangleFloat(const llvm::APFloat &f) { assert(numCharacters != 0); // Allocate a buffer of the right number of characters. - llvm::SmallVector<char, 20> buffer; + SmallVector<char, 20> buffer; buffer.set_size(numCharacters); // Fill the buffer left-to-right. |