diff options
-rw-r--r-- | clang/include/clang/AST/DeclBase.h | 2 | ||||
-rw-r--r-- | clang/include/clang/AST/DeclOpenMP.h | 10 | ||||
-rw-r--r-- | clang/include/clang/AST/OpenMPClause.h | 6 | ||||
-rw-r--r-- | clang/include/clang/AST/StmtOpenMP.h | 4 | ||||
-rw-r--r-- | clang/include/clang/AST/UnresolvedSet.h | 2 | ||||
-rw-r--r-- | clang/include/clang/Basic/LLVM.h | 2 | ||||
-rw-r--r-- | clang/include/clang/Parse/Parser.h | 2 | ||||
-rw-r--r-- | clang/include/clang/Sema/Ownership.h | 10 | ||||
-rw-r--r-- | clang/include/clang/Sema/Sema.h | 4 | ||||
-rw-r--r-- | clang/lib/AST/ItaniumMangle.cpp | 4 | ||||
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaStmt.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaType.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/TreeTransform.h | 6 |
16 files changed, 34 insertions, 32 deletions
diff --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h index c77b2b60dfc..607ca4ec27c 100644 --- a/clang/include/clang/AST/DeclBase.h +++ b/clang/include/clang/AST/DeclBase.h @@ -1000,7 +1000,7 @@ public: void print(raw_ostream &OS) const override; }; -typedef llvm::MutableArrayRef<NamedDecl*> DeclContextLookupResult; +typedef MutableArrayRef<NamedDecl *> DeclContextLookupResult; typedef ArrayRef<NamedDecl *> DeclContextLookupConstResult; diff --git a/clang/include/clang/AST/DeclOpenMP.h b/clang/include/clang/AST/DeclOpenMP.h index 76282a34021..1b329dcd005 100644 --- a/clang/include/clang/AST/DeclOpenMP.h +++ b/clang/include/clang/AST/DeclOpenMP.h @@ -47,10 +47,10 @@ class OMPThreadPrivateDecl : public Decl { NumVars); } - llvm::MutableArrayRef<Expr *> getVars() { - return llvm::MutableArrayRef<Expr *>( - reinterpret_cast<Expr **>(this + 1), - NumVars); + MutableArrayRef<Expr *> getVars() { + return MutableArrayRef<Expr *>( + reinterpret_cast<Expr **>(this + 1), + NumVars); } void setVars(ArrayRef<Expr *> VL); @@ -62,7 +62,7 @@ public: static OMPThreadPrivateDecl *CreateDeserialized(ASTContext &C, unsigned ID, unsigned N); - typedef llvm::MutableArrayRef<Expr *>::iterator varlist_iterator; + typedef MutableArrayRef<Expr *>::iterator varlist_iterator; typedef ArrayRef<const Expr *>::iterator varlist_const_iterator; typedef llvm::iterator_range<varlist_iterator> varlist_range; typedef llvm::iterator_range<varlist_const_iterator> varlist_const_range; diff --git a/clang/include/clang/AST/OpenMPClause.h b/clang/include/clang/AST/OpenMPClause.h index 0b1aaffcf3f..95cb11ce645 100644 --- a/clang/include/clang/AST/OpenMPClause.h +++ b/clang/include/clang/AST/OpenMPClause.h @@ -76,8 +76,8 @@ template <class T> class OMPVarListClause : public OMPClause { protected: /// \brief Fetches list of variables associated with this clause. - llvm::MutableArrayRef<Expr *> getVarRefs() { - return llvm::MutableArrayRef<Expr *>( + MutableArrayRef<Expr *> getVarRefs() { + return MutableArrayRef<Expr *>( reinterpret_cast<Expr **>( reinterpret_cast<char *>(this) + llvm::RoundUpToAlignment(sizeof(T), llvm::alignOf<Expr *>())), @@ -108,7 +108,7 @@ protected: : OMPClause(K, StartLoc, EndLoc), LParenLoc(LParenLoc), NumVars(N) {} public: - typedef llvm::MutableArrayRef<Expr *>::iterator varlist_iterator; + typedef MutableArrayRef<Expr *>::iterator varlist_iterator; typedef ArrayRef<const Expr *>::iterator varlist_const_iterator; typedef llvm::iterator_range<varlist_iterator> varlist_range; typedef llvm::iterator_range<varlist_const_iterator> varlist_const_range; diff --git a/clang/include/clang/AST/StmtOpenMP.h b/clang/include/clang/AST/StmtOpenMP.h index 59f24facb39..dfbc9a0bac4 100644 --- a/clang/include/clang/AST/StmtOpenMP.h +++ b/clang/include/clang/AST/StmtOpenMP.h @@ -49,10 +49,10 @@ class OMPExecutableDirective : public Stmt { const unsigned ClausesOffset; /// \brief Get the clauses storage. - llvm::MutableArrayRef<OMPClause *> getClauses() { + MutableArrayRef<OMPClause *> getClauses() { OMPClause **ClauseStorage = reinterpret_cast<OMPClause **>( reinterpret_cast<char *>(this) + ClausesOffset); - return llvm::MutableArrayRef<OMPClause *>(ClauseStorage, NumClauses); + return MutableArrayRef<OMPClause *>(ClauseStorage, NumClauses); } protected: diff --git a/clang/include/clang/AST/UnresolvedSet.h b/clang/include/clang/AST/UnresolvedSet.h index 759af2537f7..2ef5800c305 100644 --- a/clang/include/clang/AST/UnresolvedSet.h +++ b/clang/include/clang/AST/UnresolvedSet.h @@ -27,7 +27,7 @@ namespace clang { /// non-const iterator. class UnresolvedSetIterator { private: - typedef llvm::MutableArrayRef<DeclAccessPair> DeclsTy; + typedef MutableArrayRef<DeclAccessPair> DeclsTy; typedef DeclsTy::iterator IteratorTy; IteratorTy ir; diff --git a/clang/include/clang/Basic/LLVM.h b/clang/include/clang/Basic/LLVM.h index 940c19eea06..5a71fa85b3d 100644 --- a/clang/include/clang/Basic/LLVM.h +++ b/clang/include/clang/Basic/LLVM.h @@ -29,6 +29,7 @@ namespace llvm { class StringRef; class Twine; template<typename T> class ArrayRef; + template<typename T> class MutableArrayRef; template<unsigned InternalLen> class SmallString; template<typename T, unsigned N> class SmallVector; template<typename T> class SmallVectorImpl; @@ -62,6 +63,7 @@ namespace clang { using llvm::StringRef; using llvm::Twine; using llvm::ArrayRef; + using llvm::MutableArrayRef; using llvm::SmallString; using llvm::SmallVector; using llvm::SmallVectorImpl; diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index 104d4b67121..94cb271117f 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -264,7 +264,7 @@ public: typedef clang::TypeResult TypeResult; typedef Expr *ExprArg; - typedef llvm::MutableArrayRef<Stmt*> MultiStmtArg; + typedef MutableArrayRef<Stmt*> MultiStmtArg; typedef Sema::FullExprArg FullExprArg; ExprResult ExprError() { return ExprResult(true); } diff --git a/clang/include/clang/Sema/Ownership.h b/clang/include/clang/Sema/Ownership.h index c3b69bcabdd..8031562e0ec 100644 --- a/clang/include/clang/Sema/Ownership.h +++ b/clang/include/clang/Sema/Ownership.h @@ -258,11 +258,11 @@ namespace clang { typedef ActionResult<Decl*> DeclResult; typedef OpaquePtr<TemplateName> ParsedTemplateTy; - typedef llvm::MutableArrayRef<Expr*> MultiExprArg; - typedef llvm::MutableArrayRef<Stmt*> MultiStmtArg; - typedef llvm::MutableArrayRef<ParsedTemplateArgument> ASTTemplateArgsPtr; - typedef llvm::MutableArrayRef<ParsedType> MultiTypeArg; - typedef llvm::MutableArrayRef<TemplateParameterList*> MultiTemplateParamsArg; + typedef MutableArrayRef<Expr*> MultiExprArg; + typedef MutableArrayRef<Stmt*> MultiStmtArg; + typedef MutableArrayRef<ParsedTemplateArgument> ASTTemplateArgsPtr; + typedef MutableArrayRef<ParsedType> MultiTypeArg; + typedef MutableArrayRef<TemplateParameterList*> MultiTemplateParamsArg; inline ExprResult ExprError() { return ExprResult(true); } inline StmtResult StmtError() { return StmtResult(true); } diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index ce3024ec049..ce958b9411c 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -1150,7 +1150,7 @@ public: /// unqualified type will always be a FunctionProtoType. /// Otherwise, returns a NULL type. QualType BuildFunctionType(QualType T, - llvm::MutableArrayRef<QualType> ParamTypes, + MutableArrayRef<QualType> ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI); @@ -1631,7 +1631,7 @@ public: void FinalizeDeclaration(Decl *D); DeclGroupPtrTy FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS, ArrayRef<Decl *> Group); - DeclGroupPtrTy BuildDeclaratorGroup(llvm::MutableArrayRef<Decl *> Group, + DeclGroupPtrTy BuildDeclaratorGroup(MutableArrayRef<Decl *> Group, bool TypeMayContainAuto = true); /// Should be called on all declarations that might have attached diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index 92a3033ade2..1cb6ab5bd95 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -3422,8 +3422,8 @@ void CXXNameMangler::mangleSeqID(unsigned SeqID) { // <seq-id> is encoded in base-36, using digits and upper case letters. char Buffer[7]; // log(2**32) / log(36) ~= 7 - llvm::MutableArrayRef<char> BufferRef(Buffer); - llvm::MutableArrayRef<char>::reverse_iterator I = BufferRef.rbegin(); + MutableArrayRef<char> BufferRef(Buffer); + MutableArrayRef<char>::reverse_iterator I = BufferRef.rbegin(); for (; SeqID != 0; SeqID /= 36) { unsigned C = SeqID % 36; diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 0daf7364782..e6a6d09b484 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -598,8 +598,8 @@ void MicrosoftCXXNameMangler::mangleNumber(int64_t Number) { // in the range of ASCII characters 'A' to 'P'. // The number 0x123450 would be encoded as 'BCDEFA' char EncodedNumberBuffer[sizeof(uint64_t) * 2]; - llvm::MutableArrayRef<char> BufferRef(EncodedNumberBuffer); - llvm::MutableArrayRef<char>::reverse_iterator I = BufferRef.rbegin(); + MutableArrayRef<char> BufferRef(EncodedNumberBuffer); + MutableArrayRef<char>::reverse_iterator I = BufferRef.rbegin(); for (; Value != 0; Value >>= 4) *I++ = 'A' + (Value & 0xf); Out.write(I.base(), I - BufferRef.rbegin()); diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 073da57b364..ef2035c2907 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -9277,7 +9277,7 @@ Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS, /// BuildDeclaratorGroup - convert a list of declarations into a declaration /// group, performing any necessary semantic checking. Sema::DeclGroupPtrTy -Sema::BuildDeclaratorGroup(llvm::MutableArrayRef<Decl *> Group, +Sema::BuildDeclaratorGroup(MutableArrayRef<Decl *> Group, bool TypeMayContainAuto) { // C++0x [dcl.spec.auto]p7: // If the type deduced for the template parameter U is not the same in each diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index e513568ec31..4eed8c1467e 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -10429,7 +10429,7 @@ static ExprResult BuildRecoveryCallExpr(Sema &SemaRef, Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, - llvm::MutableArrayRef<Expr *> Args, + MutableArrayRef<Expr *> Args, SourceLocation RParenLoc, bool EmptyLookup, bool AllowTypoCorrection) { // Do not try to recover if it is already building a recovery call. diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index d27e75aefa6..dc1cddc59f5 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -1934,7 +1934,7 @@ Sema::ActOnCXXForRangeStmt(SourceLocation ForLoc, // Claim the type doesn't contain auto: we've already done the checking. DeclGroupPtrTy RangeGroup = - BuildDeclaratorGroup(llvm::MutableArrayRef<Decl *>((Decl **)&RangeVar, 1), + BuildDeclaratorGroup(MutableArrayRef<Decl *>((Decl **)&RangeVar, 1), /*TypeMayContainAuto=*/ false); StmtResult RangeDecl = ActOnDeclStmt(RangeGroup, RangeLoc, RangeLoc); if (RangeDecl.isInvalid()) { @@ -2251,7 +2251,7 @@ Sema::BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation ColonLoc, Decl *BeginEndDecls[] = { BeginVar, EndVar }; // Claim the type doesn't contain auto: we've already done the checking. DeclGroupPtrTy BeginEndGroup = - BuildDeclaratorGroup(llvm::MutableArrayRef<Decl *>(BeginEndDecls, 2), + BuildDeclaratorGroup(MutableArrayRef<Decl *>(BeginEndDecls, 2), /*TypeMayContainAuto=*/ false); BeginEndDecl = ActOnDeclStmt(BeginEndGroup, ColonLoc, ColonLoc); diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index f7042927e49..99c61106b86 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -1763,7 +1763,7 @@ bool Sema::CheckFunctionReturnType(QualType T, SourceLocation Loc) { } QualType Sema::BuildFunctionType(QualType T, - llvm::MutableArrayRef<QualType> ParamTypes, + MutableArrayRef<QualType> ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI) { bool Invalid = false; diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 175c4e65029..c48c4d04f5e 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -750,7 +750,7 @@ public: /// By default, performs semantic analysis when building the function type. /// Subclasses may override this routine to provide different behavior. QualType RebuildFunctionProtoType(QualType T, - llvm::MutableArrayRef<QualType> ParamTypes, + MutableArrayRef<QualType> ParamTypes, const FunctionProtoType::ExtProtoInfo &EPI); /// \brief Build a new unprototyped function type. @@ -1201,7 +1201,7 @@ public: /// /// By default, performs semantic analysis to build the new statement. /// Subclasses may override this routine to provide different behavior. - StmtResult RebuildDeclStmt(llvm::MutableArrayRef<Decl *> Decls, + StmtResult RebuildDeclStmt(MutableArrayRef<Decl *> Decls, SourceLocation StartLoc, SourceLocation EndLoc) { Sema::DeclGroupPtrTy DG = getSema().BuildDeclaratorGroup(Decls); return getSema().ActOnDeclStmt(DG, StartLoc, EndLoc); @@ -9880,7 +9880,7 @@ TreeTransform<Derived>::RebuildDependentSizedExtVectorType(QualType ElementType, template<typename Derived> QualType TreeTransform<Derived>::RebuildFunctionProtoType( QualType T, - llvm::MutableArrayRef<QualType> ParamTypes, + MutableArrayRef<QualType> ParamTypes, const FunctionProtoType::ExtProtoInfo &EPI) { return SemaRef.BuildFunctionType(T, ParamTypes, getDerived().getBaseLocation(), |