diff options
Diffstat (limited to 'lib/AST')
-rw-r--r-- | lib/AST/APValue.cpp | 4 | ||||
-rw-r--r-- | lib/AST/ASTContext.cpp | 32 | ||||
-rw-r--r-- | lib/AST/ASTDiagnostic.cpp | 8 | ||||
-rw-r--r-- | lib/AST/ASTImporter.cpp | 64 | ||||
-rw-r--r-- | lib/AST/CXXInheritance.cpp | 12 | ||||
-rw-r--r-- | lib/AST/Decl.cpp | 4 | ||||
-rw-r--r-- | lib/AST/DeclBase.cpp | 14 | ||||
-rw-r--r-- | lib/AST/DeclCXX.cpp | 8 | ||||
-rw-r--r-- | lib/AST/DeclObjC.cpp | 6 | ||||
-rw-r--r-- | lib/AST/DeclPrinter.cpp | 22 | ||||
-rw-r--r-- | lib/AST/DeclTemplate.cpp | 4 | ||||
-rw-r--r-- | lib/AST/DeclarationName.cpp | 4 | ||||
-rw-r--r-- | lib/AST/DumpXML.cpp | 36 | ||||
-rw-r--r-- | lib/AST/Expr.cpp | 18 | ||||
-rw-r--r-- | lib/AST/ExprConstant.cpp | 14 | ||||
-rw-r--r-- | lib/AST/ExternalASTSource.cpp | 2 | ||||
-rw-r--r-- | lib/AST/InheritViz.cpp | 8 | ||||
-rw-r--r-- | lib/AST/ItaniumMangle.cpp | 70 | ||||
-rw-r--r-- | lib/AST/Mangle.cpp | 16 | ||||
-rw-r--r-- | lib/AST/MicrosoftMangle.cpp | 54 | ||||
-rw-r--r-- | lib/AST/NestedNameSpecifier.cpp | 4 | ||||
-rw-r--r-- | lib/AST/RecordLayoutBuilder.cpp | 12 | ||||
-rw-r--r-- | lib/AST/Stmt.cpp | 12 | ||||
-rw-r--r-- | lib/AST/StmtDumper.cpp | 8 | ||||
-rw-r--r-- | lib/AST/StmtPrinter.cpp | 14 | ||||
-rw-r--r-- | lib/AST/TemplateBase.cpp | 4 | ||||
-rw-r--r-- | lib/AST/TemplateName.cpp | 2 | ||||
-rw-r--r-- | lib/AST/Type.cpp | 2 |
28 files changed, 229 insertions, 229 deletions
diff --git a/lib/AST/APValue.cpp b/lib/AST/APValue.cpp index 86eec3b8bb..27d9234d76 100644 --- a/lib/AST/APValue.cpp +++ b/lib/AST/APValue.cpp @@ -91,7 +91,7 @@ static double GetApproxValue(const llvm::APFloat &F) { return V.convertToDouble(); } -void APValue::print(llvm::raw_ostream &OS) const { +void APValue::print(raw_ostream &OS) const { switch (getKind()) { default: assert(0 && "Unknown APValue kind!"); case Uninitialized: @@ -120,7 +120,7 @@ void APValue::print(llvm::raw_ostream &OS) const { } } -static void WriteShortAPValueToStream(llvm::raw_ostream& Out, +static void WriteShortAPValueToStream(raw_ostream& Out, const APValue& V) { switch (V.getKind()) { default: assert(0 && "Unknown APValue kind!"); diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 99a51cf7df..5463b7b7b0 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -104,7 +104,7 @@ ASTContext::getCanonicalTemplateTemplateParmDecl( // Build a canonical template parameter list. TemplateParameterList *Params = TTP->getTemplateParameters(); - llvm::SmallVector<NamedDecl *, 4> CanonParams; + SmallVector<NamedDecl *, 4> CanonParams; CanonParams.reserve(Params->size()); for (TemplateParameterList::const_iterator P = Params->begin(), PEnd = Params->end(); @@ -123,8 +123,8 @@ ASTContext::getCanonicalTemplateTemplateParmDecl( TypeSourceInfo *TInfo = getTrivialTypeSourceInfo(T); NonTypeTemplateParmDecl *Param; if (NTTP->isExpandedParameterPack()) { - llvm::SmallVector<QualType, 2> ExpandedTypes; - llvm::SmallVector<TypeSourceInfo *, 2> ExpandedTInfos; + SmallVector<QualType, 2> ExpandedTypes; + SmallVector<TypeSourceInfo *, 2> ExpandedTInfos; for (unsigned I = 0, N = NTTP->getNumExpansionTypes(); I != N; ++I) { ExpandedTypes.push_back(getCanonicalType(NTTP->getExpansionType(I))); ExpandedTInfos.push_back( @@ -2013,7 +2013,7 @@ ASTContext::getFunctionType(QualType ResultTy, // The exception spec is not part of the canonical type. QualType Canonical; if (!isCanonical || getCanonicalCallConv(CallConv) != CallConv) { - llvm::SmallVector<QualType, 16> CanonicalArgs; + SmallVector<QualType, 16> CanonicalArgs; CanonicalArgs.reserve(NumArgs); for (unsigned i = 0; i != NumArgs; ++i) CanonicalArgs.push_back(getCanonicalParamType(ArgArray[i])); @@ -2309,7 +2309,7 @@ ASTContext::getTemplateSpecializationType(TemplateName Template, unsigned NumArgs = Args.size(); - llvm::SmallVector<TemplateArgument, 4> ArgVec; + SmallVector<TemplateArgument, 4> ArgVec; ArgVec.reserve(NumArgs); for (unsigned i = 0; i != NumArgs; ++i) ArgVec.push_back(Args[i].getArgument()); @@ -2376,7 +2376,7 @@ ASTContext::getCanonicalTemplateSpecializationType(TemplateName Template, // Build the canonical template specialization type. TemplateName CanonTemplate = getCanonicalTemplateName(Template); - llvm::SmallVector<TemplateArgument, 4> CanonArgs; + SmallVector<TemplateArgument, 4> CanonArgs; CanonArgs.reserve(NumArgs); for (unsigned I = 0; I != NumArgs; ++I) CanonArgs.push_back(getCanonicalTemplateArgument(Args[I])); @@ -2496,7 +2496,7 @@ ASTContext::getDependentTemplateSpecializationType( const IdentifierInfo *Name, const TemplateArgumentListInfo &Args) const { // TODO: avoid this copy - llvm::SmallVector<TemplateArgument, 16> ArgCopy; + SmallVector<TemplateArgument, 16> ArgCopy; for (unsigned I = 0, E = Args.size(); I != E; ++I) ArgCopy.push_back(Args[I].getArgument()); return getDependentTemplateSpecializationType(Keyword, NNS, Name, @@ -2530,7 +2530,7 @@ ASTContext::getDependentTemplateSpecializationType( if (Keyword == ETK_None) CanonKeyword = ETK_Typename; bool AnyNonCanonArgs = false; - llvm::SmallVector<TemplateArgument, 16> CanonArgs(NumArgs); + SmallVector<TemplateArgument, 16> CanonArgs(NumArgs); for (unsigned I = 0; I != NumArgs; ++I) { CanonArgs[I] = getCanonicalTemplateArgument(Args[I]); if (!CanonArgs[I].structurallyEquals(Args[I])) @@ -2634,7 +2634,7 @@ QualType ASTContext::getObjCObjectType(QualType BaseType, bool ProtocolsSorted = areSortedAndUniqued(Protocols, NumProtocols); if (!ProtocolsSorted || !BaseType.isCanonical()) { if (!ProtocolsSorted) { - llvm::SmallVector<ObjCProtocolDecl*, 8> Sorted(Protocols, + SmallVector<ObjCProtocolDecl*, 8> Sorted(Protocols, Protocols + NumProtocols); unsigned UniqueCount = NumProtocols; @@ -3824,7 +3824,7 @@ bool ASTContext::BlockRequiresCopying(QualType Ty) const { } QualType -ASTContext::BuildByRefType(llvm::StringRef DeclName, QualType Ty) const { +ASTContext::BuildByRefType(StringRef DeclName, QualType Ty) const { // type = struct __Block_byref_1_X { // void *__isa; // struct __Block_byref_1_X *__forwarding; @@ -3856,7 +3856,7 @@ ASTContext::BuildByRefType(llvm::StringRef DeclName, QualType Ty) const { Ty }; - llvm::StringRef FieldNames[] = { + StringRef FieldNames[] = { "__isa", "__forwarding", "__flags", @@ -4329,7 +4329,7 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S, // Another legacy compatibility encoding. Some ObjC qualifier and type // combinations need to be rearranged. // Rewrite "in const" from "nr" to "rn" - if (llvm::StringRef(S).endswith("nr")) + if (StringRef(S).endswith("nr")) S.replace(S.end()-2, S.end(), "rn"); } @@ -5248,7 +5248,7 @@ static void getIntersectionOfProtocols(ASTContext &Context, const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT, - llvm::SmallVectorImpl<ObjCProtocolDecl *> &IntersectionOfProtocols) { + SmallVectorImpl<ObjCProtocolDecl *> &IntersectionOfProtocols) { const ObjCObjectType* LHS = LHSOPT->getObjectType(); const ObjCObjectType* RHS = RHSOPT->getObjectType(); @@ -5304,7 +5304,7 @@ QualType ASTContext::areCommonBaseCompatible( do { LHS = cast<ObjCInterfaceType>(getObjCInterfaceType(LDecl)); if (canAssignObjCInterfaces(LHS, RHS)) { - llvm::SmallVector<ObjCProtocolDecl *, 8> Protocols; + SmallVector<ObjCProtocolDecl *, 8> Protocols; getIntersectionOfProtocols(*this, Lptr, Rptr, Protocols); QualType Result = QualType(LHS, 0); @@ -5567,7 +5567,7 @@ QualType ASTContext::mergeFunctionTypes(QualType lhs, QualType rhs, return QualType(); // Check argument compatibility - llvm::SmallVector<QualType, 10> types; + SmallVector<QualType, 10> types; for (unsigned i = 0; i < lproto_nargs; i++) { QualType largtype = lproto->getArgType(i).getUnqualifiedType(); QualType rargtype = rproto->getArgType(i).getUnqualifiedType(); @@ -6234,7 +6234,7 @@ QualType ASTContext::GetBuiltinType(unsigned Id, unsigned *IntegerConstantArgs) const { const char *TypeStr = BuiltinInfo.GetTypeString(Id); - llvm::SmallVector<QualType, 8> ArgTypes; + SmallVector<QualType, 8> ArgTypes; bool RequiresICE = false; Error = GE_None; diff --git a/lib/AST/ASTDiagnostic.cpp b/lib/AST/ASTDiagnostic.cpp index 7c91b5cb7a..c93bbe60ab 100644 --- a/lib/AST/ASTDiagnostic.cpp +++ b/lib/AST/ASTDiagnostic.cpp @@ -154,14 +154,14 @@ static std::string ConvertTypeToDiagnosticString(ASTContext &Context, QualType Ty, const Diagnostic::ArgumentValue *PrevArgs, unsigned NumPrevArgs, - llvm::SmallVectorImpl<intptr_t> &QualTypeVals) { + SmallVectorImpl<intptr_t> &QualTypeVals) { // FIXME: Playing with std::string is really slow. bool ForceAKA = false; QualType CanTy = Ty.getCanonicalType(); std::string S = Ty.getAsString(Context.PrintingPolicy); std::string CanS = CanTy.getAsString(Context.PrintingPolicy); - for (llvm::SmallVectorImpl<intptr_t>::iterator I = QualTypeVals.begin(), + for (SmallVectorImpl<intptr_t>::iterator I = QualTypeVals.begin(), E = QualTypeVals.end(); I != E; ++I) { QualType CompareTy = QualType::getFromOpaquePtr(reinterpret_cast<void*>(*I)); @@ -226,9 +226,9 @@ void clang::FormatASTNodeDiagnosticArgument( unsigned ArgLen, const Diagnostic::ArgumentValue *PrevArgs, unsigned NumPrevArgs, - llvm::SmallVectorImpl<char> &Output, + SmallVectorImpl<char> &Output, void *Cookie, - llvm::SmallVectorImpl<intptr_t> &QualTypeVals) { + SmallVectorImpl<intptr_t> &QualTypeVals) { ASTContext &Context = *static_cast<ASTContext*>(Cookie); std::string S; diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp index d68d240346..2ea79912d1 100644 --- a/lib/AST/ASTImporter.cpp +++ b/lib/AST/ASTImporter.cpp @@ -92,7 +92,7 @@ namespace { TemplateArgument ImportTemplateArgument(const TemplateArgument &From); bool ImportTemplateArguments(const TemplateArgument *FromArgs, unsigned NumFromArgs, - llvm::SmallVectorImpl<TemplateArgument> &ToArgs); + SmallVectorImpl<TemplateArgument> &ToArgs); bool IsStructuralMatch(RecordDecl *FromRecord, RecordDecl *ToRecord); bool IsStructuralMatch(EnumDecl *FromEnum, EnumDecl *ToRecord); bool IsStructuralMatch(ClassTemplateDecl *From, ClassTemplateDecl *To); @@ -1518,7 +1518,7 @@ QualType ASTNodeImporter::VisitFunctionProtoType(const FunctionProtoType *T) { return QualType(); // Import argument types - llvm::SmallVector<QualType, 4> ArgTypes; + SmallVector<QualType, 4> ArgTypes; for (FunctionProtoType::arg_type_iterator A = T->arg_type_begin(), AEnd = T->arg_type_end(); A != AEnd; ++A) { @@ -1529,7 +1529,7 @@ QualType ASTNodeImporter::VisitFunctionProtoType(const FunctionProtoType *T) { } // Import exception types - llvm::SmallVector<QualType, 4> ExceptionTypes; + SmallVector<QualType, 4> ExceptionTypes; for (FunctionProtoType::exception_iterator E = T->exception_begin(), EEnd = T->exception_end(); E != EEnd; ++E) { @@ -1628,7 +1628,7 @@ QualType ASTNodeImporter::VisitTemplateSpecializationType( if (ToTemplate.isNull()) return QualType(); - llvm::SmallVector<TemplateArgument, 2> ToTemplateArgs; + SmallVector<TemplateArgument, 2> ToTemplateArgs; if (ImportTemplateArguments(T->getArgs(), T->getNumArgs(), ToTemplateArgs)) return QualType(); @@ -1677,7 +1677,7 @@ QualType ASTNodeImporter::VisitObjCObjectType(const ObjCObjectType *T) { if (ToBaseType.isNull()) return QualType(); - llvm::SmallVector<ObjCProtocolDecl *, 4> Protocols; + SmallVector<ObjCProtocolDecl *, 4> Protocols; for (ObjCObjectType::qual_iterator P = T->qual_begin(), PEnd = T->qual_end(); P != PEnd; ++P) { @@ -1788,7 +1788,7 @@ bool ASTNodeImporter::ImportDefinition(RecordDecl *From, RecordDecl *To, bool Fo if (CXXRecordDecl *ToCXX = dyn_cast<CXXRecordDecl>(To)) { CXXRecordDecl *FromCXX = cast<CXXRecordDecl>(From); - llvm::SmallVector<CXXBaseSpecifier *, 4> Bases; + SmallVector<CXXBaseSpecifier *, 4> Bases; for (CXXRecordDecl::base_class_iterator Base1 = FromCXX->bases_begin(), FromBaseEnd = FromCXX->bases_end(); @@ -1822,7 +1822,7 @@ bool ASTNodeImporter::ImportDefinition(RecordDecl *From, RecordDecl *To, bool Fo TemplateParameterList *ASTNodeImporter::ImportTemplateParameterList( TemplateParameterList *Params) { - llvm::SmallVector<NamedDecl *, 4> ToParams; + SmallVector<NamedDecl *, 4> ToParams; ToParams.reserve(Params->size()); for (TemplateParameterList::iterator P = Params->begin(), PEnd = Params->end(); @@ -1889,7 +1889,7 @@ ASTNodeImporter::ImportTemplateArgument(const TemplateArgument &From) { return TemplateArgument(); case TemplateArgument::Pack: { - llvm::SmallVector<TemplateArgument, 2> ToPack; + SmallVector<TemplateArgument, 2> ToPack; ToPack.reserve(From.pack_size()); if (ImportTemplateArguments(From.pack_begin(), From.pack_size(), ToPack)) return TemplateArgument(); @@ -1907,7 +1907,7 @@ ASTNodeImporter::ImportTemplateArgument(const TemplateArgument &From) { bool ASTNodeImporter::ImportTemplateArguments(const TemplateArgument *FromArgs, unsigned NumFromArgs, - llvm::SmallVectorImpl<TemplateArgument> &ToArgs) { + SmallVectorImpl<TemplateArgument> &ToArgs) { for (unsigned I = 0; I != NumFromArgs; ++I) { TemplateArgument To = ImportTemplateArgument(FromArgs[I]); if (To.isNull() && !FromArgs[I].isNull()) @@ -1966,7 +1966,7 @@ Decl *ASTNodeImporter::VisitNamespaceDecl(NamespaceDecl *D) { else MergeWithNamespace = cast<NamespaceDecl>(DC)->getAnonymousNamespace(); } else { - llvm::SmallVector<NamedDecl *, 4> ConflictingDecls; + SmallVector<NamedDecl *, 4> ConflictingDecls; for (DeclContext::lookup_result Lookup = DC->lookup(Name); Lookup.first != Lookup.second; ++Lookup.first) { @@ -2026,7 +2026,7 @@ Decl *ASTNodeImporter::VisitTypedefNameDecl(TypedefNameDecl *D, bool IsAlias) { // seen a typedef with the same name (that we can merge with) or any // other entity by that name (which name lookup could conflict with). if (!DC->isFunctionOrMethod()) { - llvm::SmallVector<NamedDecl *, 4> ConflictingDecls; + SmallVector<NamedDecl *, 4> ConflictingDecls; unsigned IDNS = Decl::IDNS_Ordinary; for (DeclContext::lookup_result Lookup = DC->lookup(Name); Lookup.first != Lookup.second; @@ -2106,7 +2106,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) { - llvm::SmallVector<NamedDecl *, 4> ConflictingDecls; + SmallVector<NamedDecl *, 4> ConflictingDecls; for (DeclContext::lookup_result Lookup = DC->lookup(Name); Lookup.first != Lookup.second; ++Lookup.first) { @@ -2208,7 +2208,7 @@ Decl *ASTNodeImporter::VisitRecordDecl(RecordDecl *D) { // We may already have a record of the same name; try to find and match it. RecordDecl *AdoptDecl = 0; if (!DC->isFunctionOrMethod() && SearchName) { - llvm::SmallVector<NamedDecl *, 4> ConflictingDecls; + SmallVector<NamedDecl *, 4> ConflictingDecls; for (DeclContext::lookup_result Lookup = DC->lookup(Name); Lookup.first != Lookup.second; ++Lookup.first) { @@ -2292,7 +2292,7 @@ Decl *ASTNodeImporter::VisitEnumConstantDecl(EnumConstantDecl *D) { // Determine whether there are any other declarations with the same name and // in the same context. if (!LexicalDC->isFunctionOrMethod()) { - llvm::SmallVector<NamedDecl *, 4> ConflictingDecls; + SmallVector<NamedDecl *, 4> ConflictingDecls; unsigned IDNS = Decl::IDNS_Ordinary; for (DeclContext::lookup_result Lookup = DC->lookup(Name); Lookup.first != Lookup.second; @@ -2338,7 +2338,7 @@ Decl *ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) { // Try to find a function in our own ("to") context with the same name, same // type, and in the same context as the function we're importing. if (!LexicalDC->isFunctionOrMethod()) { - llvm::SmallVector<NamedDecl *, 4> ConflictingDecls; + SmallVector<NamedDecl *, 4> ConflictingDecls; unsigned IDNS = Decl::IDNS_Ordinary; for (DeclContext::lookup_result Lookup = DC->lookup(Name); Lookup.first != Lookup.second; @@ -2393,7 +2393,7 @@ Decl *ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) { return 0; // Import the function parameters. - llvm::SmallVector<ParmVarDecl *, 8> Parameters; + SmallVector<ParmVarDecl *, 8> Parameters; for (FunctionDecl::param_iterator P = D->param_begin(), PEnd = D->param_end(); P != PEnd; ++P) { ParmVarDecl *ToP = cast_or_null<ParmVarDecl>(Importer.Import(*P)); @@ -2618,7 +2618,7 @@ Decl *ASTNodeImporter::VisitVarDecl(VarDecl *D) { // in the same context as the variable we're importing. if (D->isFileVarDecl()) { VarDecl *MergeWithVar = 0; - llvm::SmallVector<NamedDecl *, 4> ConflictingDecls; + SmallVector<NamedDecl *, 4> ConflictingDecls; unsigned IDNS = Decl::IDNS_Ordinary; for (DeclContext::lookup_result Lookup = DC->lookup(Name); Lookup.first != Lookup.second; @@ -2877,7 +2877,7 @@ Decl *ASTNodeImporter::VisitObjCMethodDecl(ObjCMethodDecl *D) { // deal with implicit parameters. // Import the parameters - llvm::SmallVector<ParmVarDecl *, 5> ToParams; + SmallVector<ParmVarDecl *, 5> ToParams; for (ObjCMethodDecl::param_iterator FromP = D->param_begin(), FromPEnd = D->param_end(); FromP != FromPEnd; @@ -2936,8 +2936,8 @@ Decl *ASTNodeImporter::VisitObjCCategoryDecl(ObjCCategoryDecl *D) { ToCategory->insertNextClassCategory(); // Import protocols - llvm::SmallVector<ObjCProtocolDecl *, 4> Protocols; - llvm::SmallVector<SourceLocation, 4> ProtocolLocs; + SmallVector<ObjCProtocolDecl *, 4> Protocols; + SmallVector<SourceLocation, 4> ProtocolLocs; ObjCCategoryDecl::protocol_loc_iterator FromProtoLoc = D->protocol_loc_begin(); for (ObjCCategoryDecl::protocol_iterator FromProto = D->protocol_begin(), @@ -3008,8 +3008,8 @@ Decl *ASTNodeImporter::VisitObjCProtocolDecl(ObjCProtocolDecl *D) { Importer.Imported(D, ToProto); // Import protocols - llvm::SmallVector<ObjCProtocolDecl *, 4> Protocols; - llvm::SmallVector<SourceLocation, 4> ProtocolLocs; + SmallVector<ObjCProtocolDecl *, 4> Protocols; + SmallVector<SourceLocation, 4> ProtocolLocs; ObjCProtocolDecl::protocol_loc_iterator FromProtoLoc = D->protocol_loc_begin(); for (ObjCProtocolDecl::protocol_iterator FromProto = D->protocol_begin(), @@ -3082,8 +3082,8 @@ Decl *ASTNodeImporter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) { } // Import protocols - llvm::SmallVector<ObjCProtocolDecl *, 4> Protocols; - llvm::SmallVector<SourceLocation, 4> ProtocolLocs; + SmallVector<ObjCProtocolDecl *, 4> Protocols; + SmallVector<SourceLocation, 4> ProtocolLocs; ObjCInterfaceDecl::protocol_loc_iterator FromProtoLoc = D->protocol_loc_begin(); @@ -3427,8 +3427,8 @@ ASTNodeImporter::VisitObjCForwardProtocolDecl(ObjCForwardProtocolDecl *D) { // Import the location of this declaration. SourceLocation Loc = Importer.Import(D->getLocation()); - llvm::SmallVector<ObjCProtocolDecl *, 4> Protocols; - llvm::SmallVector<SourceLocation, 4> Locations; + SmallVector<ObjCProtocolDecl *, 4> Protocols; + SmallVector<SourceLocation, 4> Locations; ObjCForwardProtocolDecl::protocol_loc_iterator FromProtoLoc = D->protocol_loc_begin(); for (ObjCForwardProtocolDecl::protocol_iterator FromProto @@ -3470,8 +3470,8 @@ Decl *ASTNodeImporter::VisitObjCClassDecl(ObjCClassDecl *D) { // Import the location of this declaration. SourceLocation Loc = Importer.Import(D->getLocation()); - llvm::SmallVector<ObjCInterfaceDecl *, 4> Interfaces; - llvm::SmallVector<SourceLocation, 4> Locations; + SmallVector<ObjCInterfaceDecl *, 4> Interfaces; + SmallVector<SourceLocation, 4> Locations; for (ObjCClassDecl::iterator From = D->begin(), FromEnd = D->end(); From != FromEnd; ++From) { ObjCInterfaceDecl *ToIface @@ -3591,7 +3591,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()) { - llvm::SmallVector<NamedDecl *, 4> ConflictingDecls; + SmallVector<NamedDecl *, 4> ConflictingDecls; for (DeclContext::lookup_result Lookup = DC->lookup(Name); Lookup.first != Lookup.second; ++Lookup.first) { @@ -3701,7 +3701,7 @@ Decl *ASTNodeImporter::VisitClassTemplateSpecializationDecl( SourceLocation IdLoc = Importer.Import(D->getLocation()); // Import template arguments. - llvm::SmallVector<TemplateArgument, 2> TemplateArgs; + SmallVector<TemplateArgument, 2> TemplateArgs; if (ImportTemplateArguments(D->getTemplateArgs().data(), D->getTemplateArgs().size(), TemplateArgs)) @@ -4042,7 +4042,7 @@ Decl *ASTImporter::Import(Decl *FromD) { } else if (TypedefNameDecl *FromTypedef = dyn_cast<TypedefNameDecl>(FromD)) { // When we've finished transforming a typedef, see whether it was the // typedef for an anonymous tag. - for (llvm::SmallVector<TagDecl *, 4>::iterator + for (SmallVector<TagDecl *, 4>::iterator FromTag = AnonTagsWithPendingTypedefs.begin(), FromTagEnd = AnonTagsWithPendingTypedefs.end(); FromTag != FromTagEnd; ++FromTag) { @@ -4384,7 +4384,7 @@ Selector ASTImporter::Import(Selector FromSel) { if (FromSel.isNull()) return Selector(); - llvm::SmallVector<IdentifierInfo *, 4> Idents; + SmallVector<IdentifierInfo *, 4> Idents; Idents.push_back(Import(FromSel.getIdentifierInfoForSlot(0))); for (unsigned I = 1, N = FromSel.getNumArgs(); I < N; ++I) Idents.push_back(Import(FromSel.getIdentifierInfoForSlot(I))); diff --git a/lib/AST/CXXInheritance.cpp b/lib/AST/CXXInheritance.cpp index 9ffe1f8656..f29bfd1319 100644 --- a/lib/AST/CXXInheritance.cpp +++ b/lib/AST/CXXInheritance.cpp @@ -119,7 +119,7 @@ bool CXXRecordDecl::isProvablyNotDerivedFrom(const CXXRecordDecl *Base) const { bool CXXRecordDecl::forallBases(ForallBasesCallback *BaseMatches, void *OpaqueData, bool AllowShortCircuit) const { - llvm::SmallVector<const CXXRecordDecl*, 8> Queue; + SmallVector<const CXXRecordDecl*, 8> Queue; const CXXRecordDecl *Record = this; bool AllMatches = true; @@ -425,7 +425,7 @@ FindNestedNameSpecifierMember(const CXXBaseSpecifier *Specifier, void OverridingMethods::add(unsigned OverriddenSubobject, UniqueVirtualMethod Overriding) { - llvm::SmallVector<UniqueVirtualMethod, 4> &SubobjectOverrides + SmallVector<UniqueVirtualMethod, 4> &SubobjectOverrides = Overrides[OverriddenSubobject]; if (std::find(SubobjectOverrides.begin(), SubobjectOverrides.end(), Overriding) == SubobjectOverrides.end()) @@ -556,7 +556,7 @@ void FinalOverriderCollector::Collect(const CXXRecordDecl *RD, // overrides. typedef std::pair<CXXMethodDecl::method_iterator, CXXMethodDecl::method_iterator> OverriddenMethods; - llvm::SmallVector<OverriddenMethods, 4> Stack; + SmallVector<OverriddenMethods, 4> Stack; Stack.push_back(std::make_pair(CanonM->begin_overridden_methods(), CanonM->end_overridden_methods())); while (!Stack.empty()) { @@ -623,11 +623,11 @@ CXXRecordDecl::getFinalOverriders(CXXFinalOverriderMap &FinalOverriders) const { SOEnd = OM->second.end(); SO != SOEnd; ++SO) { - llvm::SmallVector<UniqueVirtualMethod, 4> &Overriding = SO->second; + SmallVector<UniqueVirtualMethod, 4> &Overriding = SO->second; if (Overriding.size() < 2) continue; - for (llvm::SmallVector<UniqueVirtualMethod, 4>::iterator + for (SmallVector<UniqueVirtualMethod, 4>::iterator Pos = Overriding.begin(), PosEnd = Overriding.end(); Pos != PosEnd; /* increment in loop */) { @@ -642,7 +642,7 @@ CXXRecordDecl::getFinalOverriders(CXXFinalOverriderMap &FinalOverriders) const { // in a base class subobject that hides the virtual base class // subobject. bool Hidden = false; - for (llvm::SmallVector<UniqueVirtualMethod, 4>::iterator + for (SmallVector<UniqueVirtualMethod, 4>::iterator OP = Overriding.begin(), OPEnd = Overriding.end(); OP != OPEnd && !Hidden; ++OP) { diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index b7884e04cb..ed8171d3ef 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -818,7 +818,7 @@ std::string NamedDecl::getQualifiedNameAsString(const PrintingPolicy &P) const { if (Ctx->isFunctionOrMethod()) return getNameAsString(); - typedef llvm::SmallVector<const DeclContext *, 8> ContextsTy; + typedef SmallVector<const DeclContext *, 8> ContextsTy; ContextsTy Contexts; // Collect contexts. @@ -2387,7 +2387,7 @@ void RecordDecl::LoadFieldsFromExternalStorage() const { // Notify that we have a RecordDecl doing some initialization. ExternalASTSource::Deserializing TheFields(Source); - llvm::SmallVector<Decl*, 64> Decls; + SmallVector<Decl*, 64> Decls; LoadedFieldsFromExternalStorage = true; switch (Source->FindExternalLexicalDeclsBy<FieldDecl>(this, Decls)) { case ELR_Success: diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index b2806f092c..27d05baca2 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -148,7 +148,7 @@ bool Decl::isDefinedOutsideFunctionOrMethod() const { // PrettyStackTraceDecl Implementation //===----------------------------------------------------------------------===// -void PrettyStackTraceDecl::print(llvm::raw_ostream &OS) const { +void PrettyStackTraceDecl::print(raw_ostream &OS) const { SourceLocation TheLoc = Loc; if (TheLoc.isInvalid() && TheDecl) TheLoc = TheDecl->getLocation(); @@ -265,8 +265,8 @@ bool Decl::isReferenced() const { static AvailabilityResult CheckAvailability(ASTContext &Context, const AvailabilityAttr *A, std::string *Message) { - llvm::StringRef TargetPlatform = Context.Target.getPlatformName(); - llvm::StringRef PrettyPlatformName + StringRef TargetPlatform = Context.Target.getPlatformName(); + StringRef PrettyPlatformName = AvailabilityAttr::getPrettyPlatformName(TargetPlatform); if (PrettyPlatformName.empty()) PrettyPlatformName = TargetPlatform; @@ -812,7 +812,7 @@ DeclContext *DeclContext::getNextContext() { } std::pair<Decl *, Decl *> -DeclContext::BuildDeclChain(const llvm::SmallVectorImpl<Decl*> &Decls) { +DeclContext::BuildDeclChain(const SmallVectorImpl<Decl*> &Decls) { // Build up a chain of declarations via the Decl::NextDeclInContext field. Decl *FirstNewDecl = 0; Decl *PrevDecl = 0; @@ -840,7 +840,7 @@ DeclContext::LoadLexicalDeclsFromExternalStorage() const { ExternalASTSource::Deserializing ADeclContext(Source); // Load the external declarations, if any. - llvm::SmallVector<Decl*, 64> Decls; + SmallVector<Decl*, 64> Decls; ExternalLexicalStorage = false; switch (Source->FindExternalLexicalDecls(this, Decls)) { case ELR_Success: @@ -890,7 +890,7 @@ ExternalASTSource::SetNoExternalVisibleDeclsForName(const DeclContext *DC, DeclContext::lookup_result ExternalASTSource::SetExternalVisibleDeclsForName(const DeclContext *DC, DeclarationName Name, - llvm::SmallVectorImpl<NamedDecl*> &Decls) { + SmallVectorImpl<NamedDecl*> &Decls) { ASTContext &Context = DC->getParentASTContext();; StoredDeclsMap *Map; @@ -910,7 +910,7 @@ ExternalASTSource::SetExternalVisibleDeclsForName(const DeclContext *DC, void ExternalASTSource::MaterializeVisibleDeclsForName(const DeclContext *DC, DeclarationName Name, - llvm::SmallVectorImpl<NamedDecl*> &Decls) { + SmallVectorImpl<NamedDecl*> &Decls) { assert(DC->LookupPtr); StoredDeclsMap &Map = *DC->LookupPtr; diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp index 4b59bf37d7..aaa75dcad7 100644 --- a/lib/AST/DeclCXX.cpp +++ b/lib/AST/DeclCXX.cpp @@ -89,7 +89,7 @@ CXXRecordDecl::setBases(CXXBaseSpecifier const * const *Bases, llvm::SmallPtrSet<CanQualType, 8> SeenVBaseTypes; // The virtual bases of this class. - llvm::SmallVector<const CXXBaseSpecifier *, 8> VBases; + SmallVector<const CXXBaseSpecifier *, 8> VBases; data().Bases = new(C) CXXBaseSpecifier [NumBases]; data().NumBases = NumBases; @@ -287,7 +287,7 @@ bool CXXRecordDecl::isTriviallyCopyable() const { /// (if there is one). static CXXMethodDecl * GetBestOverloadCandidateSimple( - const llvm::SmallVectorImpl<std::pair<CXXMethodDecl *, Qualifiers> > &Cands) { + const SmallVectorImpl<std::pair<CXXMethodDecl *, Qualifiers> > &Cands) { if (Cands.empty()) return 0; if (Cands.size() == 1) @@ -313,7 +313,7 @@ CXXConstructorDecl *CXXRecordDecl::getCopyConstructor(unsigned TypeQuals) const{ = Context.DeclarationNames.getCXXConstructorName( Context.getCanonicalType(ClassType)); unsigned FoundTQs; - llvm::SmallVector<std::pair<CXXMethodDecl *, Qualifiers>, 4> Found; + SmallVector<std::pair<CXXMethodDecl *, Qualifiers>, 4> Found; DeclContext::lookup_const_iterator Con, ConEnd; for (llvm::tie(Con, ConEnd) = this->lookup(ConstructorName); Con != ConEnd; ++Con) { @@ -349,7 +349,7 @@ CXXMethodDecl *CXXRecordDecl::getCopyAssignmentOperator(bool ArgIsConst) const { QualType Class = Context.getTypeDeclType(const_cast<CXXRecordDecl *>(this)); |