From: Craig Topper Date: Sat, 28 Jun 2014 23:22:23 +0000 (+0000) Subject: Remove llvm:: from uses of ArrayRef. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=489b66f7058f476989dbcc446610ace9a719f845;p=clang Remove llvm:: from uses of ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211987 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index e8310977be..e208280ccc 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -619,7 +619,7 @@ public: /// constant. bool EvaluateWithSubstitution(APValue &Value, ASTContext &Ctx, const FunctionDecl *Callee, - llvm::ArrayRef Args) const; + ArrayRef Args) const; /// \brief Enumeration used to describe the kind of Null pointer constant /// returned from \c isNullPointerConstant(). diff --git a/include/clang/AST/TemplateBase.h b/include/clang/AST/TemplateBase.h index 27ea358345..9e4a577c4c 100644 --- a/include/clang/AST/TemplateBase.h +++ b/include/clang/AST/TemplateBase.h @@ -335,9 +335,9 @@ public: } /// \brief Return the array of arguments in this template argument pack. - llvm::ArrayRef getPackAsArray() const { + ArrayRef getPackAsArray() const { assert(getKind() == Pack); - return llvm::ArrayRef(Args.Args, Args.NumArgs); + return ArrayRef(Args.Args, Args.NumArgs); } /// \brief Determines whether two template arguments are superficially the diff --git a/include/clang/ASTMatchers/ASTMatchers.h b/include/clang/ASTMatchers/ASTMatchers.h index ed0e657dc1..6583679f57 100644 --- a/include/clang/ASTMatchers/ASTMatchers.h +++ b/include/clang/ASTMatchers/ASTMatchers.h @@ -334,7 +334,7 @@ AST_POLYMORPHIC_MATCHER_P( AST_POLYMORPHIC_SUPPORTED_TYPES_2(ClassTemplateSpecializationDecl, TemplateSpecializationType), internal::Matcher, InnerMatcher) { - llvm::ArrayRef List = + ArrayRef List = internal::getTemplateSpecializationArgs(Node); return matchesFirstInRange(InnerMatcher, List.begin(), List.end(), Finder, Builder); @@ -434,7 +434,7 @@ AST_POLYMORPHIC_MATCHER_P2( AST_POLYMORPHIC_SUPPORTED_TYPES_2(ClassTemplateSpecializationDecl, TemplateSpecializationType), unsigned, N, internal::Matcher, InnerMatcher) { - llvm::ArrayRef List = + ArrayRef List = internal::getTemplateSpecializationArgs(Node); if (List.size() <= N) return false; diff --git a/include/clang/ASTMatchers/ASTMatchersInternal.h b/include/clang/ASTMatchers/ASTMatchersInternal.h index ed20dee088..7e634e2d63 100644 --- a/include/clang/ASTMatchers/ASTMatchersInternal.h +++ b/include/clang/ASTMatchers/ASTMatchersInternal.h @@ -1566,14 +1566,14 @@ TypeTraversePolymorphicMatcher< // FIXME: unify ClassTemplateSpecializationDecl and TemplateSpecializationType's // APIs for accessing the template argument list. -inline llvm::ArrayRef +inline ArrayRef getTemplateSpecializationArgs(const ClassTemplateSpecializationDecl &D) { return D.getTemplateArgs().asArray(); } -inline llvm::ArrayRef +inline ArrayRef getTemplateSpecializationArgs(const TemplateSpecializationType &T) { - return llvm::ArrayRef(T.getArgs(), T.getNumArgs()); + return ArrayRef(T.getArgs(), T.getNumArgs()); } struct NotEqualsBoundNodePredicate { diff --git a/include/clang/ASTMatchers/Dynamic/Registry.h b/include/clang/ASTMatchers/Dynamic/Registry.h index 72ae6126f7..faa9254bc2 100644 --- a/include/clang/ASTMatchers/Dynamic/Registry.h +++ b/include/clang/ASTMatchers/Dynamic/Registry.h @@ -79,7 +79,7 @@ public: /// namedDecl and varDecl are excluded in a FunctionDecl context, because /// those matchers would match respectively all or no nodes in such a context. static std::vector - getCompletions(llvm::ArrayRef > Context); + getCompletions(ArrayRef > Context); /// \brief Construct a matcher from the registry. /// diff --git a/include/clang/CodeGen/CodeGenABITypes.h b/include/clang/CodeGen/CodeGenABITypes.h index 90c74942cb..2502982b23 100644 --- a/include/clang/CodeGen/CodeGenABITypes.h +++ b/include/clang/CodeGen/CodeGenABITypes.h @@ -63,9 +63,9 @@ public: const CGFunctionInfo &arrangeCXXMethodType(const CXXRecordDecl *RD, const FunctionProtoType *FTP); const CGFunctionInfo &arrangeFreeFunctionCall(CanQualType returnType, - llvm::ArrayRef argTypes, - FunctionType::ExtInfo info, - RequiredArgs args); + ArrayRef argTypes, + FunctionType::ExtInfo info, + RequiredArgs args); private: /// Default CodeGenOptions object used to initialize the diff --git a/include/clang/Sema/Template.h b/include/clang/Sema/Template.h index 03fb523b04..a0e7232228 100644 --- a/include/clang/Sema/Template.h +++ b/include/clang/Sema/Template.h @@ -493,7 +493,7 @@ namespace clang { Decl *VisitVarTemplateSpecializationDecl( VarTemplateDecl *VarTemplate, VarDecl *FromVar, void *InsertPos, const TemplateArgumentListInfo &TemplateArgsInfo, - llvm::ArrayRef Converted); + ArrayRef Converted); Decl *InstantiateTypedefNameDecl(TypedefNameDecl *D, bool IsTypeAlias); ClassTemplatePartialSpecializationDecl * diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index be29d8f9da..620d86e15f 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -1839,11 +1839,11 @@ public: void removeOverriddenMacros(IdentifierInfo *II, AmbiguousMacros &Ambig, - llvm::ArrayRef Overrides); + ArrayRef Overrides); AmbiguousMacros * removeOverriddenMacros(IdentifierInfo *II, - llvm::ArrayRef Overrides); + ArrayRef Overrides); /// \brief Retrieve the macro with the given ID. MacroInfo *getMacro(serialization::MacroID ID); @@ -2024,7 +2024,7 @@ public: void addPendingMacroFromModule(IdentifierInfo *II, ModuleFile *M, serialization::GlobalMacroID GMacID, - llvm::ArrayRef); + ArrayRef); /// \brief Add a macro to deserialize its macro directive history from a PCH. /// diff --git a/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h b/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h index 507c267093..26335bf68d 100644 --- a/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h +++ b/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h @@ -197,7 +197,7 @@ class CallEffects { public: /// Returns the argument effects for a call. - llvm::ArrayRef getArgs() const { return Args; } + ArrayRef getArgs() const { return Args; } /// Returns the effects on the receiver. ArgEffect getReceiver() const { return Receiver; } diff --git a/lib/ARCMigrate/ObjCMT.cpp b/lib/ARCMigrate/ObjCMT.cpp index b31672960c..ccd9c9a2cf 100644 --- a/lib/ARCMigrate/ObjCMT.cpp +++ b/lib/ARCMigrate/ObjCMT.cpp @@ -1359,7 +1359,7 @@ void ObjCMigrateASTConsumer::AddCFAnnotations(ASTContext &Ctx, Editor->commit(commit); } } - llvm::ArrayRef AEArgs = CE.getArgs(); + ArrayRef AEArgs = CE.getArgs(); unsigned i = 0; for (FunctionDecl::param_const_iterator pi = FuncDecl->param_begin(), pe = FuncDecl->param_end(); pi != pe; ++pi, ++i) { @@ -1411,7 +1411,7 @@ ObjCMigrateASTConsumer::CF_BRIDGING_KIND // At this point result type is audited for potential inclusion. // Now, how about argument types. - llvm::ArrayRef AEArgs = CE.getArgs(); + ArrayRef AEArgs = CE.getArgs(); unsigned i = 0; bool ArgCFAudited = false; for (FunctionDecl::param_const_iterator pi = FuncDecl->param_begin(), @@ -1488,7 +1488,7 @@ void ObjCMigrateASTConsumer::AddCFAnnotations(ASTContext &Ctx, Editor->commit(commit); } } - llvm::ArrayRef AEArgs = CE.getArgs(); + ArrayRef AEArgs = CE.getArgs(); unsigned i = 0; for (ObjCMethodDecl::param_const_iterator pi = MethodDecl->param_begin(), pe = MethodDecl->param_end(); pi != pe; ++pi, ++i) { @@ -1544,7 +1544,7 @@ void ObjCMigrateASTConsumer::migrateAddMethodAnnotation( // At this point result type is either annotated or audited. // Now, how about argument types. - llvm::ArrayRef AEArgs = CE.getArgs(); + ArrayRef AEArgs = CE.getArgs(); unsigned i = 0; for (ObjCMethodDecl::param_const_iterator pi = MethodDecl->param_begin(), pe = MethodDecl->param_end(); pi != pe; ++pi, ++i) { diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 2803310c32..98061e6c49 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -8722,7 +8722,7 @@ bool Expr::isCXX11ConstantExpr(const ASTContext &Ctx, APValue *Result, bool Expr::EvaluateWithSubstitution(APValue &Value, ASTContext &Ctx, const FunctionDecl *Callee, - llvm::ArrayRef Args) const { + ArrayRef Args) const { Expr::EvalStatus Status; EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantExpressionUnevaluated); diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp index 141c2f6ef7..0daf736478 100644 --- a/lib/AST/MicrosoftMangle.cpp +++ b/lib/AST/MicrosoftMangle.cpp @@ -1170,7 +1170,7 @@ void MicrosoftCXXNameMangler::mangleTemplateArg(const TemplateDecl *TD, mangleExpression(TA.getAsExpr()); break; case TemplateArgument::Pack: { - llvm::ArrayRef TemplateArgs = TA.getPackAsArray(); + ArrayRef TemplateArgs = TA.getPackAsArray(); if (TemplateArgs.empty()) { Out << "$S"; } else { diff --git a/lib/AST/VTableBuilder.cpp b/lib/AST/VTableBuilder.cpp index 6dc3956157..9c1a701645 100644 --- a/lib/AST/VTableBuilder.cpp +++ b/lib/AST/VTableBuilder.cpp @@ -3120,9 +3120,8 @@ void VFTableBuilder::dumpLayout(raw_ostream &Out) { } static bool setsIntersect(const llvm::SmallPtrSet &A, - const llvm::ArrayRef &B) { - for (llvm::ArrayRef::iterator I = B.begin(), - E = B.end(); + const ArrayRef &B) { + for (ArrayRef::iterator I = B.begin(), E = B.end(); I != E; ++I) { if (A.count(*I)) return true; diff --git a/lib/ASTMatchers/Dynamic/Marshallers.h b/lib/ASTMatchers/Dynamic/Marshallers.h index 439d3d5a3a..6e144cd26e 100644 --- a/lib/ASTMatchers/Dynamic/Marshallers.h +++ b/lib/ASTMatchers/Dynamic/Marshallers.h @@ -158,10 +158,10 @@ public: }; inline bool isRetKindConvertibleTo( - llvm::ArrayRef RetKinds, + ArrayRef RetKinds, ast_type_traits::ASTNodeKind Kind, unsigned *Specificity, ast_type_traits::ASTNodeKind *LeastDerivedKind) { - for (llvm::ArrayRef::const_iterator + for (ArrayRef::const_iterator i = RetKinds.begin(), e = RetKinds.end(); i != e; ++i) { @@ -199,8 +199,8 @@ public: /// \param ArgKinds The types of the arguments this matcher takes. FixedArgCountMatcherDescriptor( MarshallerType Marshaller, void (*Func)(), StringRef MatcherName, - llvm::ArrayRef RetKinds, - llvm::ArrayRef ArgKinds) + ArrayRef RetKinds, + ArrayRef ArgKinds) : Marshaller(Marshaller), Func(Func), MatcherName(MatcherName), RetKinds(RetKinds.begin(), RetKinds.end()), ArgKinds(ArgKinds.begin(), ArgKinds.end()) {} @@ -646,7 +646,7 @@ MatcherDescriptor *makeMatcherAutoMarshall(ReturnType (*Func)(), BuildReturnTypeVector::build(RetTypes); return new FixedArgCountMatcherDescriptor( matcherMarshall0, reinterpret_cast(Func), - MatcherName, RetTypes, llvm::ArrayRef()); + MatcherName, RetTypes, None); } /// \brief 1-arg overload diff --git a/lib/ASTMatchers/Dynamic/Registry.cpp b/lib/ASTMatchers/Dynamic/Registry.cpp index cea5039526..4bc50a0f2a 100644 --- a/lib/ASTMatchers/Dynamic/Registry.cpp +++ b/lib/ASTMatchers/Dynamic/Registry.cpp @@ -363,7 +363,7 @@ struct ReverseSpecificityThenName { } std::vector Registry::getCompletions( - llvm::ArrayRef > Context) { + ArrayRef > Context) { ASTNodeKind InitialTypes[] = { ASTNodeKind::getFromNodeKind(), ASTNodeKind::getFromNodeKind(), @@ -373,12 +373,12 @@ std::vector Registry::getCompletions( ASTNodeKind::getFromNodeKind(), ASTNodeKind::getFromNodeKind() }; - llvm::ArrayRef InitialTypesRef(InitialTypes); + ArrayRef InitialTypesRef(InitialTypes); // Starting with the above seed of acceptable top-level matcher types, compute // the acceptable type set for the argument indicated by each context element. std::set TypeSet(InitialTypesRef.begin(), InitialTypesRef.end()); - for (llvm::ArrayRef >::iterator + for (ArrayRef >::iterator CtxI = Context.begin(), CtxE = Context.end(); CtxI != CtxE; ++CtxI) { diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index 5bc03f3b94..d90fa69ad1 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -2403,7 +2403,7 @@ static bool AArch64SISDIntrinsicsProvenSorted = false; static const NeonIntrinsicInfo * -findNeonIntrinsicInMap(llvm::ArrayRef IntrinsicMap, +findNeonIntrinsicInMap(ArrayRef IntrinsicMap, unsigned BuiltinID, bool &MapProvenSorted) { #ifndef NDEBUG @@ -3349,7 +3349,7 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID, // Many NEON builtins have identical semantics and uses in ARM and // AArch64. Emit these in a single function. - llvm::ArrayRef IntrinsicMap(ARMSIMDIntrinsicMap); + ArrayRef IntrinsicMap(ARMSIMDIntrinsicMap); const NeonIntrinsicInfo *Builtin = findNeonIntrinsicInMap( IntrinsicMap, BuiltinID, NEONSIMDIntrinsicsProvenSorted); if (Builtin) @@ -3908,7 +3908,7 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID, for (unsigned i = 0, e = E->getNumArgs() - 1; i != e; i++) Ops.push_back(EmitScalarExpr(E->getArg(i))); - llvm::ArrayRef SISDMap(AArch64SISDIntrinsicMap); + ArrayRef SISDMap(AArch64SISDIntrinsicMap); const NeonIntrinsicInfo *Builtin = findNeonIntrinsicInMap( SISDMap, BuiltinID, AArch64SISDIntrinsicsProvenSorted); diff --git a/lib/CodeGen/CGCXXABI.cpp b/lib/CodeGen/CGCXXABI.cpp index 1f0de31364..ee65d77d4b 100644 --- a/lib/CodeGen/CGCXXABI.cpp +++ b/lib/CodeGen/CGCXXABI.cpp @@ -311,7 +311,7 @@ CGCXXABI::EmitCtorCompleteObjectHandler(CodeGenFunction &CGF, } void CGCXXABI::EmitThreadLocalInitFuncs( - llvm::ArrayRef > Decls, + ArrayRef > Decls, llvm::Function *InitFunc) { } diff --git a/lib/CodeGen/CGCXXABI.h b/lib/CodeGen/CGCXXABI.h index 82b4e88397..0a31d2aa12 100644 --- a/lib/CodeGen/CGCXXABI.h +++ b/lib/CodeGen/CGCXXABI.h @@ -507,7 +507,7 @@ public: /// initialization or non-trivial destruction for thread_local /// variables, a function to perform the initialization. Otherwise, 0. virtual void EmitThreadLocalInitFuncs( - llvm::ArrayRef > Decls, + ArrayRef > Decls, llvm::Function *InitFunc); /// Emit a reference to a non-local thread_local variable (including diff --git a/lib/CodeGen/CodeGenABITypes.cpp b/lib/CodeGen/CodeGenABITypes.cpp index fba7184d55..180cd51940 100644 --- a/lib/CodeGen/CodeGenABITypes.cpp +++ b/lib/CodeGen/CodeGenABITypes.cpp @@ -61,7 +61,7 @@ CodeGenABITypes::arrangeCXXMethodType(const CXXRecordDecl *RD, const CGFunctionInfo & CodeGenABITypes::arrangeFreeFunctionCall(CanQualType returnType, - llvm::ArrayRef argTypes, + ArrayRef argTypes, FunctionType::ExtInfo info, RequiredArgs args) { return CGM->getTypes().arrangeLLVMFunctionInfo( diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 2fe2b9bc36..4786b08f03 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -2312,7 +2312,7 @@ public: llvm::Value *EmitARCRetainScalarExpr(const Expr *expr); llvm::Value *EmitARCRetainAutoreleaseScalarExpr(const Expr *expr); - void EmitARCIntrinsicUse(llvm::ArrayRef values); + void EmitARCIntrinsicUse(ArrayRef values); static Destroyer destroyARCStrongImprecise; static Destroyer destroyARCStrongPrecise; diff --git a/lib/CodeGen/ItaniumCXXABI.cpp b/lib/CodeGen/ItaniumCXXABI.cpp index d5e1daeb12..28634d8a70 100644 --- a/lib/CodeGen/ItaniumCXXABI.cpp +++ b/lib/CodeGen/ItaniumCXXABI.cpp @@ -232,7 +232,7 @@ public: llvm::Function *getOrCreateThreadLocalWrapper(const VarDecl *VD, llvm::GlobalVariable *Var); void EmitThreadLocalInitFuncs( - llvm::ArrayRef > Decls, + ArrayRef > Decls, llvm::Function *InitFunc) override; LValue EmitThreadLocalVarDeclLValue(CodeGenFunction &CGF, const VarDecl *VD, QualType LValType) override; @@ -1831,7 +1831,7 @@ ItaniumCXXABI::getOrCreateThreadLocalWrapper(const VarDecl *VD, } void ItaniumCXXABI::EmitThreadLocalInitFuncs( - llvm::ArrayRef > Decls, + ArrayRef > Decls, llvm::Function *InitFunc) { for (unsigned I = 0, N = Decls.size(); I != N; ++I) { const VarDecl *VD = Decls[I].first; diff --git a/lib/CodeGen/MicrosoftRTTI.cpp b/lib/CodeGen/MicrosoftRTTI.cpp index 0ce754edfb..14dfa8545f 100644 --- a/lib/CodeGen/MicrosoftRTTI.cpp +++ b/lib/CodeGen/MicrosoftRTTI.cpp @@ -153,7 +153,7 @@ static llvm::StructType *getCompleteObjectLocatorType(CodeGenModule &CGM) { CGM, getClassHierarchyDescriptorType(CGM)->getPointerTo()), getImageRelativeType(CGM, Type), }; - llvm::ArrayRef FieldTypesRef( + ArrayRef FieldTypesRef( std::begin(FieldTypes), isImageRelative(CGM) ? std::end(FieldTypes) : std::end(FieldTypes) - 1); Type->setBody(FieldTypesRef); @@ -341,7 +341,7 @@ llvm::GlobalVariable *MSRTTIBuilder::getClassHierarchyDescriptor() { getImageRelativeConstant(CGM, llvm::ConstantExpr::getInBoundsGetElementPtr( getBaseClassArray(Classes), - llvm::ArrayRef(GEPIndices))), + ArrayRef(GEPIndices))), }; CHD->setInitializer(llvm::ConstantStruct::get(Type, Fields)); return CHD; @@ -460,7 +460,7 @@ MSRTTIBuilder::getCompleteObjectLocator(const VPtrInfo *Info) { getImageRelativeConstant(CGM, getClassHierarchyDescriptor()), getImageRelativeConstant(CGM, COL), }; - llvm::ArrayRef FieldsRef(Fields); + ArrayRef FieldsRef(Fields); if (!isImageRelative(CGM)) FieldsRef = FieldsRef.slice(0, FieldsRef.size() - 1); COL->setInitializer(llvm::ConstantStruct::get(Type, FieldsRef)); diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 1e9f0fa6d0..fc3ede0994 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -5135,7 +5135,7 @@ ExprResult Sema::ActOnDecltypeExpression(Expr *E) { /// Note a set of 'operator->' functions that were used for a member access. static void noteOperatorArrows(Sema &S, - llvm::ArrayRef OperatorArrows) { + ArrayRef OperatorArrows) { unsigned SkipStart = OperatorArrows.size(), SkipCount = 0; // FIXME: Make this configurable? unsigned Limit = 9; diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index bfdf94ce42..e513568ec3 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -5732,8 +5732,8 @@ EnableIfAttr *Sema::CheckEnableIf(FunctionDecl *Function, ArrayRef Args, EnableIfAttr *EIA = cast(*I); if (!EIA->getCond()->EvaluateWithSubstitution( Result, Context, Function, - llvm::ArrayRef(ConvertedArgs.data(), - ConvertedArgs.size())) || + ArrayRef(ConvertedArgs.data(), + ConvertedArgs.size())) || !Result.isInt() || !Result.getInt().getBoolValue()) { return EIA; } diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index 0790daf16d..c655d3f86b 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -2516,7 +2516,7 @@ Decl *TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl( Decl *TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl( VarTemplateDecl *VarTemplate, VarDecl *D, void *InsertPos, const TemplateArgumentListInfo &TemplateArgsInfo, - llvm::ArrayRef Converted) { + ArrayRef Converted) { // If this is the variable for an anonymous struct or union, // instantiate the anonymous struct/union type first. diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 5ac6ccc10e..7f7fc1ce99 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -805,7 +805,7 @@ IdentifierInfo *ASTIdentifierLookupTrait::ReadData(const internal_key_type& k, I -= *SI; uint32_t LocalMacroID = *I; - llvm::ArrayRef Overrides; + ArrayRef Overrides; if (*SI != 1) Overrides = llvm::makeArrayRef(&I[2], *SI - 2); Reader.addPendingMacroFromModule(II, &F, LocalMacroID, Overrides); @@ -1557,7 +1557,7 @@ HeaderFileInfoTrait::ReadData(internal_key_ref key, const unsigned char *d, void ASTReader::addPendingMacroFromModule(IdentifierInfo *II, ModuleFile *M, GlobalMacroID GMacID, - llvm::ArrayRef Overrides) { + ArrayRef Overrides) { assert(NumCurrentElementsDeserializing > 0 &&"Missing deserialization guard"); SubmoduleID *OverrideData = nullptr; if (!Overrides.empty()) { @@ -1726,9 +1726,9 @@ struct ASTReader::ModuleMacroInfo { SubmoduleID getSubmoduleID() const { return SubModID; } - llvm::ArrayRef getOverriddenSubmodules() const { + ArrayRef getOverriddenSubmodules() const { if (!Overrides) - return llvm::ArrayRef(); + return None; return llvm::makeArrayRef(Overrides + 1, *Overrides); } @@ -1878,7 +1878,7 @@ static bool areDefinedInSystemModules(MacroInfo *PrevMI, MacroInfo *NewMI, void ASTReader::removeOverriddenMacros(IdentifierInfo *II, AmbiguousMacros &Ambig, - llvm::ArrayRef Overrides) { + ArrayRef Overrides) { for (unsigned OI = 0, ON = Overrides.size(); OI != ON; ++OI) { SubmoduleID OwnerID = Overrides[OI]; @@ -1903,7 +1903,7 @@ void ASTReader::removeOverriddenMacros(IdentifierInfo *II, ASTReader::AmbiguousMacros * ASTReader::removeOverriddenMacros(IdentifierInfo *II, - llvm::ArrayRef Overrides) { + ArrayRef Overrides) { MacroDirective *Prev = PP.getMacroDirective(II); if (!Prev && Overrides.empty()) return nullptr; diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index 855991d914..a02a959d8c 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -3163,7 +3163,7 @@ public: } static void emitMacroOverrides(raw_ostream &Out, - llvm::ArrayRef Overridden) { + ArrayRef Overridden) { if (!Overridden.empty()) { using namespace llvm::support; endian::Writer LE(Out); diff --git a/lib/StaticAnalyzer/Core/CallEvent.cpp b/lib/StaticAnalyzer/Core/CallEvent.cpp index a02e413123..7e0670a066 100644 --- a/lib/StaticAnalyzer/Core/CallEvent.cpp +++ b/lib/StaticAnalyzer/Core/CallEvent.cpp @@ -311,7 +311,7 @@ static void addParameterValuesToBindings(const StackFrameContext *CalleeCtx, ArrayRef AnyFunctionCall::parameters() const { const FunctionDecl *D = getDecl(); if (!D) - return llvm::ArrayRef(); + return None; return D->parameters(); } diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp index 77bdab7227..8993a092e0 100644 --- a/tools/driver/driver.cpp +++ b/tools/driver/driver.cpp @@ -300,7 +300,7 @@ int main(int argc_, const char **argv_) { SmallVector argv; llvm::SpecificBumpPtrAllocator ArgAllocator; std::error_code EC = llvm::sys::Process::GetArgumentVector( - argv, llvm::ArrayRef(argv_, argc_), ArgAllocator); + argv, ArrayRef(argv_, argc_), ArgAllocator); if (EC) { llvm::errs() << "error: couldn't get arguments: " << EC.message() << '\n'; return 1; diff --git a/unittests/ASTMatchers/Dynamic/RegistryTest.cpp b/unittests/ASTMatchers/Dynamic/RegistryTest.cpp index 5d5392492d..e659b3a733 100644 --- a/unittests/ASTMatchers/Dynamic/RegistryTest.cpp +++ b/unittests/ASTMatchers/Dynamic/RegistryTest.cpp @@ -83,7 +83,7 @@ public: CompVector getCompletions() { return Registry::getCompletions( - llvm::ArrayRef >()); + ArrayRef >()); } CompVector getCompletions(StringRef MatcherName1, unsigned ArgNo1) {