diff --git a/bolt/tools/bat-dump/bat-dump.cpp b/bolt/tools/bat-dump/bat-dump.cpp --- a/bolt/tools/bat-dump/bat-dump.cpp +++ b/bolt/tools/bat-dump/bat-dump.cpp @@ -151,7 +151,7 @@ } int main(int argc, char **argv) { - cl::HideUnrelatedOptions(makeArrayRef(opts::BatDumpCategories)); + cl::HideUnrelatedOptions(ArrayRef(opts::BatDumpCategories)); cl::ParseCommandLineOptions(argc, argv, ""); if (!sys::fs::exists(opts::InputFilename)) diff --git a/bolt/tools/driver/llvm-bolt.cpp b/bolt/tools/driver/llvm-bolt.cpp --- a/bolt/tools/driver/llvm-bolt.cpp +++ b/bolt/tools/driver/llvm-bolt.cpp @@ -98,7 +98,7 @@ } void perf2boltMode(int argc, char **argv) { - cl::HideUnrelatedOptions(makeArrayRef(opts::Perf2BoltCategories)); + cl::HideUnrelatedOptions(ArrayRef(opts::Perf2BoltCategories)); cl::AddExtraVersionPrinter(printBoltRevision); cl::ParseCommandLineOptions( argc, argv, @@ -127,7 +127,7 @@ } void boltDiffMode(int argc, char **argv) { - cl::HideUnrelatedOptions(makeArrayRef(opts::BoltDiffCategories)); + cl::HideUnrelatedOptions(ArrayRef(opts::BoltDiffCategories)); cl::AddExtraVersionPrinter(printBoltRevision); cl::ParseCommandLineOptions( argc, argv, @@ -153,7 +153,7 @@ } void boltMode(int argc, char **argv) { - cl::HideUnrelatedOptions(makeArrayRef(opts::BoltCategories)); + cl::HideUnrelatedOptions(ArrayRef(opts::BoltCategories)); // Register the target printer for --version. cl::AddExtraVersionPrinter(printBoltRevision); cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion); diff --git a/bolt/tools/heatmap/heatmap.cpp b/bolt/tools/heatmap/heatmap.cpp --- a/bolt/tools/heatmap/heatmap.cpp +++ b/bolt/tools/heatmap/heatmap.cpp @@ -50,7 +50,7 @@ } int main(int argc, char **argv) { - cl::HideUnrelatedOptions(makeArrayRef(opts::HeatmapCategories)); + cl::HideUnrelatedOptions(ArrayRef(opts::HeatmapCategories)); cl::ParseCommandLineOptions(argc, argv, ""); if (opts::PerfData.empty()) { diff --git a/clang-tools-extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp b/clang-tools-extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp --- a/clang-tools-extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp +++ b/clang-tools-extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp @@ -91,7 +91,7 @@ } int main(int argc, char **argv) { - cl::HideUnrelatedOptions(makeArrayRef(VisibleCategories)); + cl::HideUnrelatedOptions(ArrayRef(VisibleCategories)); cl::SetVersionPrinter(printVersion); cl::ParseCommandLineOptions(argc, argv); diff --git a/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp --- a/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp @@ -353,7 +353,7 @@ return; checkCallArgs(Result.Context, Callee, Call->getCallee()->getEndLoc(), - llvm::makeArrayRef(Call->getArgs(), Call->getNumArgs())); + llvm::ArrayRef(Call->getArgs(), Call->getNumArgs())); } else { const auto *Construct = cast(E); if (Construct->getNumArgs() > 0 && @@ -364,7 +364,7 @@ checkCallArgs( Result.Context, Construct->getConstructor(), Construct->getParenOrBraceRange().getBegin(), - llvm::makeArrayRef(Construct->getArgs(), Construct->getNumArgs())); + llvm::ArrayRef(Construct->getArgs(), Construct->getNumArgs())); } } diff --git a/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp --- a/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp @@ -236,7 +236,7 @@ {bugprone::SignalHandlerCheck::AsyncSafeFunctionSetKind::POSIX, "POSIX"}, }; - return makeArrayRef(Mapping); + return ArrayRef(Mapping); } }; diff --git a/clang-tools-extra/clang-tidy/concurrency/MtUnsafeCheck.cpp b/clang-tools-extra/clang-tidy/concurrency/MtUnsafeCheck.cpp --- a/clang-tools-extra/clang-tidy/concurrency/MtUnsafeCheck.cpp +++ b/clang-tools-extra/clang-tidy/concurrency/MtUnsafeCheck.cpp @@ -270,7 +270,7 @@ Mapping[] = {{concurrency::MtUnsafeCheck::FunctionSet::Posix, "posix"}, {concurrency::MtUnsafeCheck::FunctionSet::Glibc, "glibc"}, {concurrency::MtUnsafeCheck::FunctionSet::Any, "any"}}; - return makeArrayRef(Mapping); + return ArrayRef(Mapping); } }; diff --git a/clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp b/clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp --- a/clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp @@ -627,7 +627,7 @@ static ArrayRef getForwardedArgumentList(const LambdaProperties &P) { - ArrayRef Args = makeArrayRef(P.BindArguments); + ArrayRef Args = ArrayRef(P.BindArguments); if (P.Callable.Type != CT_MemberFunction) return Args; @@ -672,7 +672,7 @@ emitCaptureList(LP, Result, Stream); Stream << "]"; - ArrayRef FunctionCallArgs = makeArrayRef(LP.BindArguments); + ArrayRef FunctionCallArgs = ArrayRef(LP.BindArguments); addPlaceholderArgs(LP, Stream, PermissiveParameterList); diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp --- a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp @@ -37,7 +37,7 @@ Mapping[] = {{modernize::Confidence::CL_Reasonable, "reasonable"}, {modernize::Confidence::CL_Safe, "safe"}, {modernize::Confidence::CL_Risky, "risky"}}; - return makeArrayRef(Mapping); + return ArrayRef(Mapping); } }; @@ -50,7 +50,7 @@ {modernize::VariableNamer::NS_CamelBack, "camelBack"}, {modernize::VariableNamer::NS_LowerCase, "lower_case"}, {modernize::VariableNamer::NS_UpperCase, "UPPER_CASE"}}; - return makeArrayRef(Mapping); + return ArrayRef(Mapping); } }; diff --git a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp --- a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp @@ -47,7 +47,7 @@ "Camel_Snake_Case"}, {readability::IdentifierNamingCheck::CT_CamelSnakeBack, "camel_Snake_Back"}}; - return llvm::makeArrayRef(Mapping); + return llvm::ArrayRef(Mapping); } template <> @@ -62,7 +62,7 @@ {HungarianPrefixType::HPT_On, "On"}, {HungarianPrefixType::HPT_LowerCase, "LowerCase"}, {HungarianPrefixType::HPT_CamelCase, "CamelCase"}}; - return llvm::makeArrayRef(Mapping); + return llvm::ArrayRef(Mapping); } }; diff --git a/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp b/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp --- a/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp +++ b/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp @@ -231,7 +231,7 @@ Mapping[] = {{utils::IncludeSorter::IS_LLVM, "llvm"}, {utils::IncludeSorter::IS_Google, "google"}, {utils::IncludeSorter::IS_Google_ObjC, "google-objc"}}; - return makeArrayRef(Mapping); + return ArrayRef(Mapping); } } // namespace tidy } // namespace clang diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -505,7 +505,7 @@ } auto Mangler = CommandMangler::detect(); Mangler.SystemIncludeExtractor = - getSystemIncludeExtractor(llvm::makeArrayRef(Opts.QueryDriverGlobs)); + getSystemIncludeExtractor(llvm::ArrayRef(Opts.QueryDriverGlobs)); if (Opts.ResourceDir) Mangler.ResourceDir = *Opts.ResourceDir; CDB.emplace(BaseCDB.get(), Params.initializationOptions.fallbackFlags, diff --git a/clang-tools-extra/clangd/CompileCommands.cpp b/clang-tools-extra/clangd/CompileCommands.cpp --- a/clang-tools-extra/clangd/CompileCommands.cpp +++ b/clang-tools-extra/clangd/CompileCommands.cpp @@ -211,7 +211,7 @@ for (const auto &S : Cmd) OriginalArgs.push_back(S.c_str()); bool IsCLMode = driver::IsClangCL(driver::getDriverMode( - OriginalArgs[0], llvm::makeArrayRef(OriginalArgs).slice(1))); + OriginalArgs[0], llvm::ArrayRef(OriginalArgs).slice(1))); // ParseArgs propagates missig arg/opt counts on error, but preserves // everything it could parse in ArgList. So we just ignore those counts. unsigned IgnoredCount; @@ -219,7 +219,7 @@ // indices are actually of by one between ArgList and OriginalArgs. llvm::opt::InputArgList ArgList; ArgList = OptTable.ParseArgs( - llvm::makeArrayRef(OriginalArgs).drop_front(), IgnoredCount, IgnoredCount, + llvm::ArrayRef(OriginalArgs).drop_front(), IgnoredCount, IgnoredCount, /*FlagsToInclude=*/ IsCLMode ? (driver::options::CLOption | driver::options::CoreOption | driver::options::CLDXCOption) diff --git a/clang-tools-extra/clangd/FindSymbols.cpp b/clang-tools-extra/clangd/FindSymbols.cpp --- a/clang-tools-extra/clangd/FindSymbols.cpp +++ b/clang-tools-extra/clangd/FindSymbols.cpp @@ -644,7 +644,7 @@ DocumentSymbol Root; Root.children = std::move(Syms); Root.range = EntireFile; - mergePragmas(Root, llvm::makeArrayRef(Pragmas)); + mergePragmas(Root, llvm::ArrayRef(Pragmas)); return Root.children; } diff --git a/clang-tools-extra/clangd/Preamble.cpp b/clang-tools-extra/clangd/Preamble.cpp --- a/clang-tools-extra/clangd/Preamble.cpp +++ b/clang-tools-extra/clangd/Preamble.cpp @@ -58,7 +58,7 @@ const tooling::CompileCommand &RHS) { // We don't check for Output, it should not matter to clangd. return LHS.Directory == RHS.Directory && LHS.Filename == RHS.Filename && - llvm::makeArrayRef(LHS.CommandLine).equals(RHS.CommandLine); + llvm::ArrayRef(LHS.CommandLine).equals(RHS.CommandLine); } class CppFilePreambleCallbacks : public PreambleCallbacks { diff --git a/clang-tools-extra/clangd/Selection.cpp b/clang-tools-extra/clangd/Selection.cpp --- a/clang-tools-extra/clangd/Selection.cpp +++ b/clang-tools-extra/clangd/Selection.cpp @@ -262,7 +262,7 @@ SelFirst, AllSpelledTokens.end(), [&](const syntax::Token &Tok) { return SM.getFileOffset(Tok.location()) < SelEnd; }); - auto Sel = llvm::makeArrayRef(SelFirst, SelLimit); + auto Sel = llvm::ArrayRef(SelFirst, SelLimit); // Find which of these are preprocessed to nothing and should be ignored. llvm::BitVector PPIgnored(Sel.size(), false); for (const syntax::TokenBuffer::Expansion &X : @@ -419,7 +419,7 @@ if (EndInvalid) End = Toks.expandedTokens().end(); - return llvm::makeArrayRef(Start, End); + return llvm::ArrayRef(Start, End); } // Hit-test a consecutive range of tokens from a single file ID. diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp --- a/clang-tools-extra/clangd/XRefs.cpp +++ b/clang-tools-extra/clangd/XRefs.cpp @@ -726,12 +726,12 @@ return T.location() < Word.Location; // Comparison OK: same file. }); // Search for matches after the cursor. - for (const syntax::Token &Tok : llvm::makeArrayRef(I, SpelledTokens.end())) + for (const syntax::Token &Tok : llvm::ArrayRef(I, SpelledTokens.end())) if (Consider(Tok)) break; // costs of later tokens are greater... // Search for matches before the cursor. for (const syntax::Token &Tok : - llvm::reverse(llvm::makeArrayRef(SpelledTokens.begin(), I))) + llvm::reverse(llvm::ArrayRef(SpelledTokens.begin(), I))) if (Consider(Tok)) break; diff --git a/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp b/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp --- a/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp @@ -242,7 +242,7 @@ if (Tok.kind() != Kind) continue; FoundAny = true; - auto Spelling = TokBuf.spelledForExpanded(llvm::makeArrayRef(Tok)); + auto Spelling = TokBuf.spelledForExpanded(llvm::ArrayRef(Tok)); if (!Spelling) { Errors = llvm::joinErrors( std::move(Errors), diff --git a/clang-tools-extra/clangd/tool/Check.cpp b/clang-tools-extra/clangd/tool/Check.cpp --- a/clang-tools-extra/clangd/tool/Check.cpp +++ b/clang-tools-extra/clangd/tool/Check.cpp @@ -145,7 +145,7 @@ std::make_unique(CDBOpts); auto Mangler = CommandMangler::detect(); Mangler.SystemIncludeExtractor = - getSystemIncludeExtractor(llvm::makeArrayRef(Opts.QueryDriverGlobs)); + getSystemIncludeExtractor(llvm::ArrayRef(Opts.QueryDriverGlobs)); if (Opts.ResourceDir) Mangler.ResourceDir = *Opts.ResourceDir; auto CDB = std::make_unique( @@ -228,7 +228,7 @@ elog("Failed to build AST"); return false; } - ErrCount += showErrors(llvm::makeArrayRef(*AST->getDiagnostics()) + ErrCount += showErrors(llvm::ArrayRef(*AST->getDiagnostics()) .drop_front(Preamble->Diags.size())); if (Opts.BuildDynamicSymbolIndex) { diff --git a/clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp b/clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp --- a/clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp +++ b/clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp @@ -375,9 +375,9 @@ tooling::CompileCommand Cmd; Cmd.CommandLine = {"clang", "/Users/foo.cc"}; Mangler(Cmd, "/Users/foo.cc"); - EXPECT_THAT(llvm::makeArrayRef(Cmd.CommandLine).take_back(2), + EXPECT_THAT(llvm::ArrayRef(Cmd.CommandLine).take_back(2), ElementsAre("--", "/Users/foo.cc")); - EXPECT_THAT(llvm::makeArrayRef(Cmd.CommandLine).drop_back(2), + EXPECT_THAT(llvm::ArrayRef(Cmd.CommandLine).drop_back(2), Not(Contains("/Users/foo.cc"))); } // In CL mode /U triggers an undef operation, hence `/Users/foo.cc` shouldn't @@ -386,9 +386,9 @@ tooling::CompileCommand Cmd; Cmd.CommandLine = {"clang", "--driver-mode=cl", "bar.cc", "/Users/foo.cc"}; Mangler(Cmd, "bar.cc"); - EXPECT_THAT(llvm::makeArrayRef(Cmd.CommandLine).take_back(2), + EXPECT_THAT(llvm::ArrayRef(Cmd.CommandLine).take_back(2), ElementsAre("--", "bar.cc")); - EXPECT_THAT(llvm::makeArrayRef(Cmd.CommandLine).drop_back(2), + EXPECT_THAT(llvm::ArrayRef(Cmd.CommandLine).drop_back(2), Not(Contains("bar.cc"))); } // All inputs but the main file is dropped. @@ -396,10 +396,10 @@ tooling::CompileCommand Cmd; Cmd.CommandLine = {"clang", "foo.cc", "bar.cc"}; Mangler(Cmd, "baz.cc"); - EXPECT_THAT(llvm::makeArrayRef(Cmd.CommandLine).take_back(2), + EXPECT_THAT(llvm::ArrayRef(Cmd.CommandLine).take_back(2), ElementsAre("--", "baz.cc")); EXPECT_THAT( - llvm::makeArrayRef(Cmd.CommandLine).drop_back(2), + llvm::ArrayRef(Cmd.CommandLine).drop_back(2), testing::AllOf(Not(Contains("foo.cc")), Not(Contains("bar.cc")))); } } diff --git a/clang-tools-extra/include-cleaner/lib/HTMLReport.cpp b/clang-tools-extra/include-cleaner/lib/HTMLReport.cpp --- a/clang-tools-extra/include-cleaner/lib/HTMLReport.cpp +++ b/clang-tools-extra/include-cleaner/lib/HTMLReport.cpp @@ -460,7 +460,7 @@ return std::make_pair(Refs[A].Offset, Refs[A].Type != RefType::Implicit) < std::make_pair(Refs[B].Offset, Refs[B].Type != RefType::Implicit); }); - auto Rest = llvm::makeArrayRef(RefOrder); + auto Rest = llvm::ArrayRef(RefOrder); unsigned End = 0; StartLine(); for (unsigned I = 0; I < Code.size(); ++I) { diff --git a/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h b/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h --- a/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h +++ b/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h @@ -139,8 +139,7 @@ // Retrieves the trailing array. llvm::ArrayRef children(uint16_t Num) const { - return llvm::makeArrayRef(reinterpret_cast(this + 1), - Num); + return llvm::ArrayRef(reinterpret_cast(this + 1), Num); } llvm::MutableArrayRef children(uint16_t Num) { return llvm::makeMutableArrayRef(reinterpret_cast(this + 1), diff --git a/clang-tools-extra/pseudo/include/clang-pseudo/GLR.h b/clang-tools-extra/pseudo/include/clang-pseudo/GLR.h --- a/clang-tools-extra/pseudo/include/clang-pseudo/GLR.h +++ b/clang-tools-extra/pseudo/include/clang-pseudo/GLR.h @@ -83,8 +83,8 @@ const ForestNode *Payload = nullptr; llvm::ArrayRef parents() const { - return llvm::makeArrayRef(reinterpret_cast(this + 1), - ParentCount); + return llvm::ArrayRef(reinterpret_cast(this + 1), + ParentCount); }; // Parents are stored as a trailing array of Node*. }; diff --git a/clang-tools-extra/pseudo/include/clang-pseudo/grammar/LRTable.h b/clang-tools-extra/pseudo/include/clang-pseudo/grammar/LRTable.h --- a/clang-tools-extra/pseudo/include/clang-pseudo/grammar/LRTable.h +++ b/clang-tools-extra/pseudo/include/clang-pseudo/grammar/LRTable.h @@ -98,8 +98,8 @@ // } llvm::ArrayRef getReduceRules(StateID State) const { assert(State + 1u < ReduceOffset.size()); - return llvm::makeArrayRef(Reduces.data() + ReduceOffset[State], - Reduces.data() + ReduceOffset[State+1]); + return llvm::ArrayRef(Reduces.data() + ReduceOffset[State], + Reduces.data() + ReduceOffset[State + 1]); } // Returns whether Terminal can follow Nonterminal in a valid source file. bool canFollow(SymbolID Nonterminal, SymbolID Terminal) const { @@ -113,8 +113,8 @@ // Looks up available recovery actions if we stopped parsing in this state. llvm::ArrayRef getRecovery(StateID State) const { - return llvm::makeArrayRef(Recoveries.data() + RecoveryOffset[State], - Recoveries.data() + RecoveryOffset[State + 1]); + return llvm::ArrayRef(Recoveries.data() + RecoveryOffset[State], + Recoveries.data() + RecoveryOffset[State + 1]); } // Returns the state from which the LR parser should start to parse the input diff --git a/clang-tools-extra/pseudo/lib/Forest.cpp b/clang-tools-extra/pseudo/lib/Forest.cpp --- a/clang-tools-extra/pseudo/lib/Forest.cpp +++ b/clang-tools-extra/pseudo/lib/Forest.cpp @@ -192,7 +192,7 @@ /*Start=*/Index, /*TerminalData*/ 0); ++Index; NodeCount = Index; - return llvm::makeArrayRef(Terminals, Index); + return llvm::ArrayRef(Terminals, Index); } } // namespace pseudo diff --git a/clang-tools-extra/pseudo/lib/GLR.cpp b/clang-tools-extra/pseudo/lib/GLR.cpp --- a/clang-tools-extra/pseudo/lib/GLR.cpp +++ b/clang-tools-extra/pseudo/lib/GLR.cpp @@ -237,7 +237,7 @@ Shifts.push_back({*S, H}); llvm::stable_sort(Shifts, llvm::less_first{}); - auto Rest = llvm::makeArrayRef(Shifts); + auto Rest = llvm::ArrayRef(Shifts); llvm::SmallVector Parents; while (!Rest.empty()) { // Collect the batch of PendingShift that have compatible shift states. diff --git a/clang-tools-extra/pseudo/lib/grammar/Grammar.cpp b/clang-tools-extra/pseudo/lib/grammar/Grammar.cpp --- a/clang-tools-extra/pseudo/lib/grammar/Grammar.cpp +++ b/clang-tools-extra/pseudo/lib/grammar/Grammar.cpp @@ -32,7 +32,7 @@ assert(isNonterminal(SID)); const auto &R = T->Nonterminals[SID].RuleRange; assert(R.End <= T->Rules.size()); - return llvm::makeArrayRef(&T->Rules[R.Start], R.End - R.Start); + return llvm::ArrayRef(&T->Rules[R.Start], R.End - R.Start); } const Rule &Grammar::lookupRule(RuleID RID) const { @@ -180,7 +180,7 @@ TerminalNames[tok::kw_##Keyword] = llvm::StringRef(#Keyword).upper(); #define TOK(Tok) TerminalNames[tok::Tok] = llvm::StringRef(#Tok).upper(); #include "clang/Basic/TokenKinds.def" - return llvm::makeArrayRef(TerminalNames, NumTerminals); + return llvm::ArrayRef(TerminalNames, NumTerminals); }(); return TerminalNames; } diff --git a/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp b/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp --- a/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp +++ b/clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp @@ -20,7 +20,7 @@ {Colours::Yellow, "Yellow"}, {Colours::Green, "Green"}, {Colours::Blue, "Blue"}, {Colours::Indigo, "Indigo"}, {Colours::Violet, "Violet"}}; - return makeArrayRef(Mapping); + return ArrayRef(Mapping); } }; diff --git a/flang/lib/Lower/ConvertVariable.cpp b/flang/lib/Lower/ConvertVariable.cpp --- a/flang/lib/Lower/ConvertVariable.cpp +++ b/flang/lib/Lower/ConvertVariable.cpp @@ -1014,7 +1014,7 @@ auto commonTy = fir::SequenceType::get(shape, i8Ty); auto vecTy = mlir::VectorType::get(sz, i8Ty); mlir::Attribute zero = builder.getIntegerAttr(i8Ty, 0); - auto init = mlir::DenseElementsAttr::get(vecTy, llvm::makeArrayRef(zero)); + auto init = mlir::DenseElementsAttr::get(vecTy, llvm::ArrayRef(zero)); builder.createGlobal(loc, commonTy, commonName, linkage, init); // No need to add any initial value later. return std::nullopt; diff --git a/flang/tools/flang-driver/driver.cpp b/flang/tools/flang-driver/driver.cpp --- a/flang/tools/flang-driver/driver.cpp +++ b/flang/tools/flang-driver/driver.cpp @@ -63,7 +63,7 @@ static int executeFC1Tool(llvm::SmallVectorImpl &argV) { llvm::StringRef tool = argV[1]; if (tool == "-fc1") - return fc1_main(makeArrayRef(argV).slice(2), argV[0]); + return fc1_main(llvm::ArrayRef(argV).slice(2), argV[0]); // Reject unknown tools. // ATM it only supports fc1. Any fc1[*] is rejected. diff --git a/libc/benchmarks/LibcDefaultImplementations.cpp b/libc/benchmarks/LibcDefaultImplementations.cpp --- a/libc/benchmarks/LibcDefaultImplementations.cpp +++ b/libc/benchmarks/LibcDefaultImplementations.cpp @@ -24,30 +24,30 @@ llvm::ArrayRef getMemcpyConfigurations() { static constexpr MemcpyConfiguration kMemcpyConfigurations[] = { {__llvm_libc::memcpy, "__llvm_libc::memcpy"}}; - return llvm::makeArrayRef(kMemcpyConfigurations); + return llvm::ArrayRef(kMemcpyConfigurations); } llvm::ArrayRef getMemmoveConfigurations() { static constexpr MemmoveConfiguration kMemmoveConfigurations[] = { {__llvm_libc::memmove, "__llvm_libc::memmove"}}; - return llvm::makeArrayRef(kMemmoveConfigurations); + return llvm::ArrayRef(kMemmoveConfigurations); } llvm::ArrayRef getMemcmpConfigurations() { static constexpr MemcmpOrBcmpConfiguration kMemcmpConfiguration[] = { {__llvm_libc::memcmp, "__llvm_libc::memcmp"}}; - return llvm::makeArrayRef(kMemcmpConfiguration); + return llvm::ArrayRef(kMemcmpConfiguration); } llvm::ArrayRef getBcmpConfigurations() { static constexpr MemcmpOrBcmpConfiguration kBcmpConfigurations[] = { {__llvm_libc::bcmp, "__llvm_libc::bcmp"}}; - return llvm::makeArrayRef(kBcmpConfigurations); + return llvm::ArrayRef(kBcmpConfigurations); } llvm::ArrayRef getMemsetConfigurations() { static constexpr MemsetConfiguration kMemsetConfigurations[] = { {__llvm_libc::memset, "__llvm_libc::memset"}}; - return llvm::makeArrayRef(kMemsetConfigurations); + return llvm::ArrayRef(kMemsetConfigurations); } llvm::ArrayRef getBzeroConfigurations() { static constexpr BzeroConfiguration kBzeroConfigurations[] = { {__llvm_libc::bzero, "__llvm_libc::bzero"}}; - return llvm::makeArrayRef(kBzeroConfigurations); + return llvm::ArrayRef(kBzeroConfigurations); } diff --git a/libc/benchmarks/LibcMemoryBenchmarkMain.cpp b/libc/benchmarks/LibcMemoryBenchmarkMain.cpp --- a/libc/benchmarks/LibcMemoryBenchmarkMain.cpp +++ b/libc/benchmarks/LibcMemoryBenchmarkMain.cpp @@ -97,7 +97,7 @@ CircularArrayRef generateBatch(size_t Iterations) { randomize(); - return cycle(makeArrayRef(Parameters), Iterations); + return cycle(ArrayRef(Parameters), Iterations); } protected: diff --git a/libc/benchmarks/automemcpy/lib/CodeGen.cpp b/libc/benchmarks/automemcpy/lib/CodeGen.cpp --- a/libc/benchmarks/automemcpy/lib/CodeGen.cpp +++ b/libc/benchmarks/automemcpy/lib/CodeGen.cpp @@ -314,7 +314,7 @@ // {"memcpy_0x8661D80472487AB5",{FunctionType::MEMCPY,Contiguous{{0,1}},std::nullopt,std::nullopt,std::nullopt,Accelerator{{1,kMaxSize}},ElementTypeClass::NATIVE}}, // ... // }; -// return makeArrayRef(kDescriptors); +// return ArrayRef(kDescriptors); // } static raw_ostream &operator<<(raw_ostream &Stream, const SizeSpan &SS) { @@ -415,7 +415,7 @@ Stream << kIndent << kIndent << Descriptors[I] << ",\n"; } Stream << R"( }; - return makeArrayRef(kDescriptors); + return ArrayRef(kDescriptors); } )"; } @@ -434,7 +434,7 @@ // {Wrap, "memcpy_0x8661D80472487AB5"}, // ... // }; -// return llvm::makeArrayRef(kConfigurations); +// return llvm::ArrayRef(kConfigurations); // } // The `Wrap` template function is provided in the `Main` function below. @@ -509,7 +509,7 @@ << " kConfigurations[] = {\n"; Stream << C.Descriptors; Stream << kIndent << "};\n"; - Stream << kIndent << "return llvm::makeArrayRef(kConfigurations);\n"; + Stream << kIndent << "return llvm::ArrayRef(kConfigurations);\n"; } Stream << "}\n"; return Stream; diff --git a/libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp b/libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp --- a/libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp +++ b/libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp @@ -148,7 +148,7 @@ {"memset_0x3DF0F44E2ED6A50F",{FunctionType::MEMSET,Contiguous{{0,2}},Overlap{{2,256}},std::nullopt,AlignedLoop{Loop{{256,kMaxSize},32},32,AlignArg::_1},std::nullopt,ElementTypeClass::NATIVE}}, {"bzero_0x475977492C218AD4",{FunctionType::BZERO,Contiguous{{0,4}},Overlap{{4,128}},std::nullopt,AlignedLoop{Loop{{128,kMaxSize},32},32,AlignArg::_1},std::nullopt,ElementTypeClass::NATIVE}}, }; - return makeArrayRef(kDescriptors); + return ArrayRef(kDescriptors); } } // namespace automemcpy @@ -168,7 +168,7 @@ {Wrap, "memcpy_0xE00E29EE73994E2B"}, {Wrap, "memcpy_0x7381B60C7BE75EF9"}, }; - return llvm::makeArrayRef(kConfigurations); + return llvm::ArrayRef(kConfigurations); } using MemcmpStub = int (*)(const char *, const char *, size_t); @@ -182,7 +182,7 @@ static constexpr MemcmpOrBcmpConfiguration kConfigurations[] = { {Wrap, "memcmp_0x348D7BA6DB0EE033"}, }; - return llvm::makeArrayRef(kConfigurations); + return llvm::ArrayRef(kConfigurations); } llvm::ArrayRef getBcmpConfigurations() { return {}; @@ -199,7 +199,7 @@ {Wrap, "memset_0x71E761699B999863"}, {Wrap, "memset_0x3DF0F44E2ED6A50F"}, }; - return llvm::makeArrayRef(kConfigurations); + return llvm::ArrayRef(kConfigurations); } using BzeroStub = void (*)(char *, size_t); @@ -211,7 +211,7 @@ static constexpr BzeroConfiguration kConfigurations[] = { {Wrap, "bzero_0x475977492C218AD4"}, }; - return llvm::makeArrayRef(kConfigurations); + return llvm::ArrayRef(kConfigurations); } llvm::ArrayRef getMemmoveConfigurations() { diff --git a/lld/COFF/Chunks.h b/lld/COFF/Chunks.h --- a/lld/COFF/Chunks.h +++ b/lld/COFF/Chunks.h @@ -276,7 +276,7 @@ } ArrayRef getRelocs() const { - return llvm::makeArrayRef(relocsData, relocsSize); + return llvm::ArrayRef(relocsData, relocsSize); } // Reloc setter used by ARM range extension thunk insertion. diff --git a/lld/COFF/DebugTypes.cpp b/lld/COFF/DebugTypes.cpp --- a/lld/COFF/DebugTypes.cpp +++ b/lld/COFF/DebugTypes.cpp @@ -603,7 +603,7 @@ return; GloballyHashedType *hashes = new GloballyHashedType[hashVec.size()]; memcpy(hashes, hashVec.data(), hashVec.size() * sizeof(GloballyHashedType)); - ghashes = makeArrayRef(hashes, hashVec.size()); + ghashes = ArrayRef(hashes, hashVec.size()); ownedGHashes = true; } @@ -1127,8 +1127,7 @@ // - source 0, type 1... // - source 1, type 0... std::vector entries; - for (const GHashCell &cell : - makeArrayRef(ghashState.table.table, tableSize)) { + for (const GHashCell &cell : ArrayRef(ghashState.table.table, tableSize)) { if (!cell.isEmpty()) entries.push_back(cell); } @@ -1195,8 +1194,8 @@ ctx.tpiSourceList.insert(ctx.tpiSourceList.end(), objs.begin(), objs.end()); for (uint32_t i = 0, e = ctx.tpiSourceList.size(); i < e; ++i) ctx.tpiSourceList[i]->tpiSrcIdx = i; - dependencySources = makeArrayRef(ctx.tpiSourceList.data(), numDeps); - objectSources = makeArrayRef(ctx.tpiSourceList.data() + numDeps, numObjs); + dependencySources = ArrayRef(ctx.tpiSourceList.data(), numDeps); + objectSources = ArrayRef(ctx.tpiSourceList.data() + numDeps, numObjs); } /// Given the index into the ghash table for a particular type, return the type diff --git a/lld/COFF/DriverUtils.cpp b/lld/COFF/DriverUtils.cpp --- a/lld/COFF/DriverUtils.cpp +++ b/lld/COFF/DriverUtils.cpp @@ -853,7 +853,7 @@ if (!args.hasArg(OPT_lldignoreenv)) addLINK(expandedArgv); cl::ExpandResponseFiles(saver(), getQuotingStyle(args), expandedArgv); - args = ctx.optTable.ParseArgs(makeArrayRef(expandedArgv).drop_front(), + args = ctx.optTable.ParseArgs(ArrayRef(expandedArgv).drop_front(), missingIndex, missingCount); // Print the real command line if response files are expanded. diff --git a/lld/COFF/PDB.cpp b/lld/COFF/PDB.cpp --- a/lld/COFF/PDB.cpp +++ b/lld/COFF/PDB.cpp @@ -494,7 +494,7 @@ static void addGlobalSymbol(pdb::GSIStreamBuilder &builder, uint16_t modIndex, unsigned symOffset, std::vector &symStorage) { - CVSymbol sym(makeArrayRef(symStorage)); + CVSymbol sym{ArrayRef(symStorage)}; switch (sym.kind()) { case SymbolKind::S_CONSTANT: case SymbolKind::S_UDT: @@ -508,7 +508,7 @@ // to stabilize it. uint8_t *mem = bAlloc().Allocate(sym.length()); memcpy(mem, sym.data().data(), sym.length()); - builder.addGlobalSymbol(CVSymbol(makeArrayRef(mem, sym.length()))); + builder.addGlobalSymbol(CVSymbol(ArrayRef(mem, sym.length()))); break; } case SymbolKind::S_GPROC32: @@ -1021,7 +1021,7 @@ assert(debugChunk.getOutputSectionIdx() == 0 && "debug sections should not be in output sections"); debugChunk.writeTo(buffer); - return makeArrayRef(buffer, debugChunk.getSize()); + return ArrayRef(buffer, debugChunk.getSize()); } void PDBLinker::addDebugSymbols(TpiSource *source) { @@ -1422,7 +1422,7 @@ ons.Name = "* Linker *"; ons.Signature = 0; - ArrayRef args = makeArrayRef(ctx.config.argv).drop_front(); + ArrayRef args = ArrayRef(ctx.config.argv).drop_front(); std::string argStr = quote(args); ebs.Fields.push_back("cwd"); SmallString<64> cwd; diff --git a/lld/ELF/Arch/AMDGPU.cpp b/lld/ELF/Arch/AMDGPU.cpp --- a/lld/ELF/Arch/AMDGPU.cpp +++ b/lld/ELF/Arch/AMDGPU.cpp @@ -51,7 +51,7 @@ uint32_t ret = getEFlags(ctx.objectFiles[0]); // Verify that all input files have the same e_flags. - for (InputFile *f : makeArrayRef(ctx.objectFiles).slice(1)) { + for (InputFile *f : ArrayRef(ctx.objectFiles).slice(1)) { if (ret == getEFlags(f)) continue; error("incompatible e_flags: " + toString(f)); @@ -69,7 +69,7 @@ // Verify that all input files have compatible e_flags (same mach, all // features in the same category are either ANY, ANY and ON, or ANY and OFF). - for (InputFile *f : makeArrayRef(ctx.objectFiles).slice(1)) { + for (InputFile *f : ArrayRef(ctx.objectFiles).slice(1)) { if (retMach != (getEFlags(f) & EF_AMDGPU_MACH)) { error("incompatible mach: " + toString(f)); return 0; diff --git a/lld/ELF/Arch/AVR.cpp b/lld/ELF/Arch/AVR.cpp --- a/lld/ELF/Arch/AVR.cpp +++ b/lld/ELF/Arch/AVR.cpp @@ -240,7 +240,7 @@ uint32_t flags = getEFlags(ctx.objectFiles[0]); bool hasLinkRelaxFlag = flags & EF_AVR_LINKRELAX_PREPARED; - for (InputFile *f : makeArrayRef(ctx.objectFiles).slice(1)) { + for (InputFile *f : ArrayRef(ctx.objectFiles).slice(1)) { uint32_t objFlags = getEFlags(f); if ((objFlags & EF_AVR_ARCH_MASK) != (flags & EF_AVR_ARCH_MASK)) error(toString(f) + diff --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp --- a/lld/ELF/Arch/PPC64.cpp +++ b/lld/ELF/Arch/PPC64.cpp @@ -271,8 +271,8 @@ // instructions and write [first,end). auto *sec = make( nullptr, SHF_ALLOC, SHT_PROGBITS, 4, - makeArrayRef(reinterpret_cast(buf.data() + first), - 4 * (buf.size() - first)), + ArrayRef(reinterpret_cast(buf.data() + first), + 4 * (buf.size() - first)), ".text"); ctx.inputSections.push_back(sec); for (Defined *sym : defined) { diff --git a/lld/ELF/Arch/RISCV.cpp b/lld/ELF/Arch/RISCV.cpp --- a/lld/ELF/Arch/RISCV.cpp +++ b/lld/ELF/Arch/RISCV.cpp @@ -620,7 +620,7 @@ // Get st_value delta for symbols relative to this section from the previous // iteration. DenseMap valueDelta; - ArrayRef sa = makeArrayRef(aux.anchors); + ArrayRef sa = ArrayRef(aux.anchors); uint32_t delta = 0; for (auto [i, r] : llvm::enumerate(sec.relocs())) { for (; sa.size() && sa[0].offset <= r.offset; sa = sa.slice(1)) @@ -631,7 +631,7 @@ for (const SymbolAnchor &sa : sa) if (!sa.end) valueDelta[sa.d] = delta; - sa = makeArrayRef(aux.anchors); + sa = ArrayRef(aux.anchors); delta = 0; std::fill_n(aux.relocTypes.get(), sec.relocs().size(), R_RISCV_NONE); diff --git a/lld/ELF/Config.h b/lld/ELF/Config.h --- a/lld/ELF/Config.h +++ b/lld/ELF/Config.h @@ -450,7 +450,7 @@ // The first two elements of versionDefinitions represent VER_NDX_LOCAL and // VER_NDX_GLOBAL. This helper returns other elements. static inline ArrayRef namedVersionDefs() { - return llvm::makeArrayRef(config->versionDefinitions).slice(2); + return llvm::ArrayRef(config->versionDefinitions).slice(2); } void errorOrWarn(const Twine &msg); diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -2688,7 +2688,7 @@ // compileBitcodeFiles may have produced lto.tmp object files. After this, no // more file will be added. - auto newObjectFiles = makeArrayRef(ctx.objectFiles).slice(numObjsBeforeLTO); + auto newObjectFiles = ArrayRef(ctx.objectFiles).slice(numObjsBeforeLTO); parallelForEach(newObjectFiles, [](ELFFileBase *file) { initSectionsAndLocalSyms(file, /*ignoreComdats=*/true); }); diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h --- a/lld/ELF/InputFiles.h +++ b/lld/ELF/InputFiles.h @@ -174,11 +174,11 @@ ArrayRef getLocalSymbols() { if (numSymbols == 0) return {}; - return llvm::makeArrayRef(symbols.get() + 1, firstGlobal - 1); + return llvm::ArrayRef(symbols.get() + 1, firstGlobal - 1); } ArrayRef getGlobalSymbols() { - return llvm::makeArrayRef(symbols.get() + firstGlobal, - numSymbols - firstGlobal); + return llvm::ArrayRef(symbols.get() + firstGlobal, + numSymbols - firstGlobal); } MutableArrayRef getMutableGlobalSymbols() { return llvm::makeMutableArrayRef(symbols.get() + firstGlobal, diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h --- a/lld/ELF/InputSection.h +++ b/lld/ELF/InputSection.h @@ -241,7 +241,7 @@ template llvm::ArrayRef getDataAs() const { size_t s = content().size(); assert(s % sizeof(T) == 0); - return llvm::makeArrayRef((const T *)content().data(), s / sizeof(T)); + return llvm::ArrayRef((const T *)content().data(), s / sizeof(T)); } protected: diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -44,7 +44,7 @@ static ArrayRef getSectionContents(ObjFile &file, const typename ELFT::Shdr &hdr) { if (hdr.sh_type == SHT_NOBITS) - return makeArrayRef(nullptr, hdr.sh_size); + return ArrayRef(nullptr, hdr.sh_size); return check(file.getObj().getSectionContents(hdr)); } @@ -139,14 +139,14 @@ typename ELFT::Shdr shdr = cast(file)->getELFShdrs()[relSecIdx]; if (shdr.sh_type == SHT_REL) { - ret.rels = makeArrayRef(reinterpret_cast( - file->mb.getBufferStart() + shdr.sh_offset), - shdr.sh_size / sizeof(typename ELFT::Rel)); + ret.rels = ArrayRef(reinterpret_cast( + file->mb.getBufferStart() + shdr.sh_offset), + shdr.sh_size / sizeof(typename ELFT::Rel)); } else { assert(shdr.sh_type == SHT_RELA); - ret.relas = makeArrayRef(reinterpret_cast( - file->mb.getBufferStart() + shdr.sh_offset), - shdr.sh_size / sizeof(typename ELFT::Rela)); + ret.relas = ArrayRef(reinterpret_cast( + file->mb.getBufferStart() + shdr.sh_offset), + shdr.sh_size / sizeof(typename ELFT::Rela)); } return ret; } diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -397,7 +397,7 @@ // Split input into 1-MiB shards. constexpr size_t shardSize = 1 << 20; - auto shardsIn = split(makeArrayRef(buf.get(), size), shardSize); + auto shardsIn = split(ArrayRef(buf.get(), size), shardSize); const size_t numShards = shardsIn.size(); // Compress shards and compute Alder-32 checksums. Use Z_SYNC_FLUSH for all @@ -697,7 +697,7 @@ storage.insert(storage.end(), isd->sections.begin(), isd->sections.end()); } } - return storage.empty() ? ret : makeArrayRef(storage); + return storage.empty() ? ret : ArrayRef(storage); } // Sorts input sections by section name suffixes, so that .foo.N comes diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -2810,7 +2810,7 @@ }); size_t numSymbols = 0; - for (ArrayRef v : makeArrayRef(symbols.get(), numShards)) + for (ArrayRef v : ArrayRef(symbols.get(), numShards)) numSymbols += v.size(); // The return type is a flattened vector, so we'll copy each vector @@ -3698,7 +3698,7 @@ if (config->emachine == EM_AMDGPU && !ctx.objectFiles.empty()) { uint8_t ver = ctx.objectFiles[0]->abiVersion; - for (InputFile *file : makeArrayRef(ctx.objectFiles).slice(1)) + for (InputFile *file : ArrayRef(ctx.objectFiles).slice(1)) if (file->abiVersion != ver) error("incompatible ABI version: " + toString(file)); return ver; diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1360,11 +1360,11 @@ } isd->sections.clear(); - for (InputSection *isec : makeArrayRef(unorderedSections).slice(0, insPt)) + for (InputSection *isec : ArrayRef(unorderedSections).slice(0, insPt)) isd->sections.push_back(isec); for (std::pair p : orderedSections) isd->sections.push_back(p.first); - for (InputSection *isec : makeArrayRef(unorderedSections).slice(insPt)) + for (InputSection *isec : ArrayRef(unorderedSections).slice(insPt)) isd->sections.push_back(isec); } @@ -2919,7 +2919,7 @@ }); // Write to the final output buffer. - hashFn(hashBuf.data(), makeArrayRef(hashes.get(), hashesSize)); + hashFn(hashBuf.data(), ArrayRef(hashes.get(), hashesSize)); } template void Writer::writeBuildId() { diff --git a/lldb/include/lldb/Utility/AnsiTerminal.h b/lldb/include/lldb/Utility/AnsiTerminal.h --- a/lldb/include/lldb/Utility/AnsiTerminal.h +++ b/lldb/include/lldb/Utility/AnsiTerminal.h @@ -137,7 +137,7 @@ #undef _TO_STR2 }; // clang-format on - auto codes = llvm::makeArrayRef(g_color_tokens); + auto codes = llvm::ArrayRef(g_color_tokens); static const char tok_hdr[] = "${ansi."; diff --git a/lldb/include/lldb/Utility/Args.h b/lldb/include/lldb/Utility/Args.h --- a/lldb/include/lldb/Utility/Args.h +++ b/lldb/include/lldb/Utility/Args.h @@ -167,7 +167,7 @@ /// have a nullptr const char * at the end, as the size of the list is /// embedded in the ArrayRef object. llvm::ArrayRef GetArgumentArrayRef() const { - return llvm::makeArrayRef(m_argv).drop_back(); + return llvm::ArrayRef(m_argv).drop_back(); } /// Appends a new argument to the end of the list argument list. diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -1645,7 +1645,7 @@ size_t len = 0; while (categories[len] != nullptr) ++len; - return llvm::makeArrayRef(categories, len); + return llvm::ArrayRef(categories, len); } bool SBDebugger::EnableLog(const char *channel, const char **categories) { diff --git a/lldb/source/Breakpoint/BreakpointID.cpp b/lldb/source/Breakpoint/BreakpointID.cpp --- a/lldb/source/Breakpoint/BreakpointID.cpp +++ b/lldb/source/Breakpoint/BreakpointID.cpp @@ -38,7 +38,7 @@ } llvm::ArrayRef BreakpointID::GetRangeSpecifiers() { - return llvm::makeArrayRef(g_range_specifiers); + return llvm::ArrayRef(g_range_specifiers); } void BreakpointID::GetDescription(Stream *s, lldb::DescriptionLevel level) { diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -56,7 +56,7 @@ ~BreakpointOptionGroup() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_breakpoint_modify_options); + return llvm::ArrayRef(g_breakpoint_modify_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, @@ -186,7 +186,7 @@ ~BreakpointDummyOptionGroup() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_breakpoint_dummy_options); + return llvm::ArrayRef(g_breakpoint_dummy_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, @@ -497,7 +497,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_breakpoint_set_options); + return llvm::ArrayRef(g_breakpoint_set_options); } // Instance variables to hold the values for command options. @@ -1159,7 +1159,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_breakpoint_list_options); + return llvm::ArrayRef(g_breakpoint_list_options); } // Instance variables to hold the values for command options. @@ -1282,7 +1282,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_breakpoint_clear_options); + return llvm::ArrayRef(g_breakpoint_clear_options); } // Instance variables to hold the values for command options. @@ -1439,7 +1439,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_breakpoint_delete_options); + return llvm::ArrayRef(g_breakpoint_delete_options); } // Instance variables to hold the values for command options. @@ -1565,7 +1565,7 @@ ~BreakpointNameOptionGroup() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_breakpoint_name_options); + return llvm::ArrayRef(g_breakpoint_name_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, @@ -1625,7 +1625,7 @@ ~BreakpointAccessOptionGroup() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_breakpoint_access_options); + return llvm::ArrayRef(g_breakpoint_access_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override { @@ -2188,7 +2188,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_breakpoint_read_options); + return llvm::ArrayRef(g_breakpoint_read_options); } void HandleOptionArgumentCompletion( @@ -2377,7 +2377,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_breakpoint_write_options); + return llvm::ArrayRef(g_breakpoint_write_options); } // Instance variables to hold the values for command options. diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp --- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp @@ -317,7 +317,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_breakpoint_command_add_options); + return llvm::ArrayRef(g_breakpoint_command_add_options); } // Instance variables to hold the values for command options. @@ -498,7 +498,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_breakpoint_command_delete_options); + return llvm::ArrayRef(g_breakpoint_command_delete_options); } // Instance variables to hold the values for command options. diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -119,7 +119,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_source_options); + return llvm::ArrayRef(g_source_options); } // Instance variables to hold the values for command options. @@ -213,7 +213,7 @@ ~CommandOptions() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_alias_options); + return llvm::ArrayRef(g_alias_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, @@ -1057,7 +1057,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_regex_options); + return llvm::ArrayRef(g_regex_options); } llvm::StringRef GetHelp() { return m_help; } @@ -1304,7 +1304,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_script_import_options); + return llvm::ArrayRef(g_script_import_options); } bool relative_to_command_file = false; bool silent = false; @@ -1455,7 +1455,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_script_add_options); + return llvm::ArrayRef(g_script_add_options); } // Instance variables to hold the values for command options. @@ -1898,7 +1898,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_container_add_options); + return llvm::ArrayRef(g_container_add_options); } // Instance variables to hold the values for command options. diff --git a/lldb/source/Commands/CommandObjectDiagnostics.cpp b/lldb/source/Commands/CommandObjectDiagnostics.cpp --- a/lldb/source/Commands/CommandObjectDiagnostics.cpp +++ b/lldb/source/Commands/CommandObjectDiagnostics.cpp @@ -57,7 +57,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_diagnostics_dump_options); + return llvm::ArrayRef(g_diagnostics_dump_options); } FileSpec directory; diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp --- a/lldb/source/Commands/CommandObjectDisassemble.cpp +++ b/lldb/source/Commands/CommandObjectDisassemble.cpp @@ -204,7 +204,7 @@ llvm::ArrayRef CommandObjectDisassemble::CommandOptions::GetDefinitions() { - return llvm::makeArrayRef(g_disassemble_options); + return llvm::ArrayRef(g_disassemble_options); } // CommandObjectDisassemble diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -172,7 +172,7 @@ llvm::ArrayRef CommandObjectExpression::CommandOptions::GetDefinitions() { - return llvm::makeArrayRef(g_expression_options); + return llvm::ArrayRef(g_expression_options); } CommandObjectExpression::CommandObjectExpression( diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -96,7 +96,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_frame_diag_options); + return llvm::ArrayRef(g_frame_diag_options); } // Options. @@ -254,7 +254,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_frame_select_options); + return llvm::ArrayRef(g_frame_select_options); } std::optional relative_frame_offset; @@ -778,7 +778,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_frame_recognizer_add_options); + return llvm::ArrayRef(g_frame_recognizer_add_options); } // Instance variables to hold the values for command options. diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp --- a/lldb/source/Commands/CommandObjectHelp.cpp +++ b/lldb/source/Commands/CommandObjectHelp.cpp @@ -71,7 +71,7 @@ llvm::ArrayRef CommandObjectHelp::CommandOptions::GetDefinitions() { - return llvm::makeArrayRef(g_help_options); + return llvm::ArrayRef(g_help_options); } bool CommandObjectHelp::DoExecute(Args &command, CommandReturnObject &result) { diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp --- a/lldb/source/Commands/CommandObjectLog.cpp +++ b/lldb/source/Commands/CommandObjectLog.cpp @@ -146,7 +146,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_log_enable_options); + return llvm::ArrayRef(g_log_enable_options); } FileSpec log_file; @@ -371,7 +371,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_log_dump_options); + return llvm::ArrayRef(g_log_dump_options); } FileSpec log_file; diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -56,7 +56,7 @@ ~OptionGroupReadMemory() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_memory_read_options); + return llvm::ArrayRef(g_memory_read_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, @@ -904,7 +904,7 @@ ~OptionGroupFindMemory() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_memory_find_options); + return llvm::ArrayRef(g_memory_find_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, @@ -1207,7 +1207,7 @@ ~OptionGroupWriteMemory() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_memory_write_options); + return llvm::ArrayRef(g_memory_write_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, @@ -1665,7 +1665,7 @@ ~OptionGroupMemoryRegion() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_memory_region_options); + return llvm::ArrayRef(g_memory_region_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, diff --git a/lldb/source/Commands/CommandObjectMemoryTag.cpp b/lldb/source/Commands/CommandObjectMemoryTag.cpp --- a/lldb/source/Commands/CommandObjectMemoryTag.cpp +++ b/lldb/source/Commands/CommandObjectMemoryTag.cpp @@ -144,7 +144,7 @@ ~OptionGroupTagWrite() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_memory_tag_write_options); + return llvm::ArrayRef(g_memory_tag_write_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp --- a/lldb/source/Commands/CommandObjectPlatform.cpp +++ b/lldb/source/Commands/CommandObjectPlatform.cpp @@ -126,7 +126,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_permissions_options); + return llvm::ArrayRef(g_permissions_options); } // Instance variables to hold the values for command options. @@ -653,7 +653,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_platform_fread_options); + return llvm::ArrayRef(g_platform_fread_options); } // Instance variables to hold the values for command options. @@ -746,7 +746,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_platform_fwrite_options); + return llvm::ArrayRef(g_platform_fwrite_options); } // Instance variables to hold the values for command options. @@ -1468,7 +1468,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_platform_process_list_options); + return llvm::ArrayRef(g_platform_process_list_options); } // Instance variables to hold the values for command options. @@ -1622,7 +1622,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_platform_process_attach_options); + return llvm::ArrayRef(g_platform_process_attach_options); } // Options table: Required for subclasses of Options. @@ -1708,7 +1708,7 @@ ~CommandOptions() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_platform_shell_options); + return llvm::ArrayRef(g_platform_shell_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -361,7 +361,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_process_attach_options); + return llvm::ArrayRef(g_process_attach_options); } ProcessAttachInfo attach_info; @@ -544,7 +544,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_process_continue_options); + return llvm::ArrayRef(g_process_continue_options); } uint32_t m_ignore = 0; @@ -838,7 +838,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_process_detach_options); + return llvm::ArrayRef(g_process_detach_options); } // Instance variables to hold the values for command options. @@ -921,7 +921,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_process_connect_options); + return llvm::ArrayRef(g_process_connect_options); } // Instance variables to hold the values for command options. @@ -1046,7 +1046,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_process_load_options); + return llvm::ArrayRef(g_process_load_options); } // Instance variables to hold the values for command options. @@ -1362,7 +1362,7 @@ ~CommandOptions() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_process_save_core_options); + return llvm::ArrayRef(g_process_save_core_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, @@ -1484,7 +1484,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_process_status_options); + return llvm::ArrayRef(g_process_status_options); } // Instance variables to hold the values for command options. @@ -1605,7 +1605,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_process_handle_options); + return llvm::ArrayRef(g_process_handle_options); } // Instance variables to hold the values for command options. diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp --- a/lldb/source/Commands/CommandObjectRegister.cpp +++ b/lldb/source/Commands/CommandObjectRegister.cpp @@ -240,7 +240,7 @@ ~CommandOptions() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_register_read_options); + return llvm::ArrayRef(g_register_read_options); } void OptionParsingStarting(ExecutionContext *execution_context) override { diff --git a/lldb/source/Commands/CommandObjectScript.cpp b/lldb/source/Commands/CommandObjectScript.cpp --- a/lldb/source/Commands/CommandObjectScript.cpp +++ b/lldb/source/Commands/CommandObjectScript.cpp @@ -53,7 +53,7 @@ llvm::ArrayRef CommandObjectScript::CommandOptions::GetDefinitions() { - return llvm::makeArrayRef(g_script_options); + return llvm::ArrayRef(g_script_options); } CommandObjectScript::CommandObjectScript(CommandInterpreter &interpreter) diff --git a/lldb/source/Commands/CommandObjectSession.cpp b/lldb/source/Commands/CommandObjectSession.cpp --- a/lldb/source/Commands/CommandObjectSession.cpp +++ b/lldb/source/Commands/CommandObjectSession.cpp @@ -117,7 +117,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_history_options); + return llvm::ArrayRef(g_history_options); } // Instance variables to hold the values for command options. diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp --- a/lldb/source/Commands/CommandObjectSettings.cpp +++ b/lldb/source/Commands/CommandObjectSettings.cpp @@ -120,7 +120,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_settings_set_options); + return llvm::ArrayRef(g_settings_set_options); } // Instance variables to hold the values for command options. @@ -359,7 +359,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_settings_write_options); + return llvm::ArrayRef(g_settings_write_options); } // Instance variables to hold the values for command options. @@ -453,7 +453,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_settings_read_options); + return llvm::ArrayRef(g_settings_read_options); } // Instance variables to hold the values for command options. @@ -1083,7 +1083,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_settings_clear_options); + return llvm::ArrayRef(g_settings_clear_options); } bool m_clear_all = false; diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp --- a/lldb/source/Commands/CommandObjectSource.cpp +++ b/lldb/source/Commands/CommandObjectSource.cpp @@ -99,7 +99,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_source_info_options); + return llvm::ArrayRef(g_source_info_options); } // Instance variables to hold the values for command options. @@ -696,7 +696,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_source_list_options); + return llvm::ArrayRef(g_source_list_options); } // Instance variables to hold the values for command options. diff --git a/lldb/source/Commands/CommandObjectStats.cpp b/lldb/source/Commands/CommandObjectStats.cpp --- a/lldb/source/Commands/CommandObjectStats.cpp +++ b/lldb/source/Commands/CommandObjectStats.cpp @@ -88,7 +88,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_statistics_dump_options); + return llvm::ArrayRef(g_statistics_dump_options); } bool m_all_targets = false; diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -153,7 +153,7 @@ ~OptionGroupDependents() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_target_dependents_options); + return llvm::ArrayRef(g_target_dependents_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, @@ -1970,7 +1970,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_target_modules_dump_symtab_options); + return llvm::ArrayRef(g_target_modules_dump_symtab_options); } SortOrder m_sort_order = eSortOrderNone; @@ -2422,7 +2422,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_target_modules_dump_options); + return llvm::ArrayRef(g_target_modules_dump_options); } bool m_verbose; @@ -2932,7 +2932,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_target_modules_list_options); + return llvm::ArrayRef(g_target_modules_list_options); } // Instance variables to hold the values for command options. @@ -3288,7 +3288,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_target_modules_show_unwind_options); + return llvm::ArrayRef(g_target_modules_show_unwind_options); } // Instance variables to hold the values for command options. @@ -3700,7 +3700,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_target_modules_lookup_options); + return llvm::ArrayRef(g_target_modules_lookup_options); } int m_type; // Should be a eLookupTypeXXX enum after parsing options @@ -4529,7 +4529,7 @@ ~CommandOptions() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_target_stop_hook_add_options); + return llvm::ArrayRef(g_target_stop_hook_add_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -96,7 +96,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_thread_backtrace_options); + return llvm::ArrayRef(g_thread_backtrace_options); } // Instance variables to hold the values for command options. @@ -254,7 +254,7 @@ ~ThreadStepScopeOptionGroup() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_thread_step_scope_options); + return llvm::ArrayRef(g_thread_step_scope_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, @@ -874,7 +874,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_thread_until_options); + return llvm::ArrayRef(g_thread_until_options); } uint32_t m_step_thread_idx = LLDB_INVALID_THREAD_ID; @@ -1270,7 +1270,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_thread_info_options); + return llvm::ArrayRef(g_thread_info_options); } bool m_json_thread; @@ -1468,7 +1468,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_thread_return_options); + return llvm::ArrayRef(g_thread_return_options); } bool m_from_expression = false; @@ -1640,7 +1640,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_thread_jump_options); + return llvm::ArrayRef(g_thread_jump_options); } FileSpecList m_filenames; @@ -1774,7 +1774,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_thread_plan_list_options); + return llvm::ArrayRef(g_thread_plan_list_options); } // Instance variables to hold the values for command options. @@ -2154,7 +2154,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_thread_trace_dump_function_calls_options); + return llvm::ArrayRef(g_thread_trace_dump_function_calls_options); } static const size_t kDefaultCount = 20; @@ -2327,7 +2327,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_thread_trace_dump_instructions_options); + return llvm::ArrayRef(g_thread_trace_dump_instructions_options); } static const size_t kDefaultCount = 20; @@ -2461,7 +2461,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_thread_trace_dump_info_options); + return llvm::ArrayRef(g_thread_trace_dump_info_options); } // Instance variables to hold the values for command options. diff --git a/lldb/source/Commands/CommandObjectTrace.cpp b/lldb/source/Commands/CommandObjectTrace.cpp --- a/lldb/source/Commands/CommandObjectTrace.cpp +++ b/lldb/source/Commands/CommandObjectTrace.cpp @@ -64,7 +64,7 @@ }; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_trace_save_options); + return llvm::ArrayRef(g_trace_save_options); }; bool m_compact; @@ -168,7 +168,7 @@ } ArrayRef GetDefinitions() override { - return makeArrayRef(g_trace_load_options); + return ArrayRef(g_trace_load_options); } bool m_verbose; // Enable verbose logging for debugging purposes. @@ -262,7 +262,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_trace_dump_options); + return llvm::ArrayRef(g_trace_dump_options); } bool m_verbose; // Enable verbose logging for debugging purposes. @@ -327,7 +327,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_trace_schema_options); + return llvm::ArrayRef(g_trace_schema_options); } bool m_verbose; // Enable verbose logging for debugging purposes. diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp --- a/lldb/source/Commands/CommandObjectType.cpp +++ b/lldb/source/Commands/CommandObjectType.cpp @@ -118,7 +118,7 @@ void OptionParsingStarting(ExecutionContext *execution_context) override; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_type_summary_add_options); + return llvm::ArrayRef(g_type_summary_add_options); } // Instance variables to hold the values for command options. @@ -351,7 +351,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_type_synth_add_options); + return llvm::ArrayRef(g_type_synth_add_options); } // Instance variables to hold the values for command options. @@ -508,7 +508,7 @@ ~CommandOptions() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_type_format_add_options); + return llvm::ArrayRef(g_type_format_add_options); } void OptionParsingStarting(ExecutionContext *execution_context) override { @@ -743,7 +743,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_type_formatter_delete_options); + return llvm::ArrayRef(g_type_formatter_delete_options); } // Instance variables to hold the values for command options. @@ -880,7 +880,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_type_formatter_clear_options); + return llvm::ArrayRef(g_type_formatter_clear_options); } // Instance variables to hold the values for command options. @@ -999,7 +999,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_type_formatter_list_options); + return llvm::ArrayRef(g_type_formatter_list_options); } // Instance variables to hold the values for command options. @@ -1700,7 +1700,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_type_category_define_options); + return llvm::ArrayRef(g_type_category_define_options); } // Instance variables to hold the values for command options. @@ -1803,7 +1803,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_type_category_enable_options); + return llvm::ArrayRef(g_type_category_enable_options); } // Instance variables to hold the values for command options. @@ -1980,7 +1980,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_type_category_disable_options); + return llvm::ArrayRef(g_type_category_disable_options); } // Instance variables to hold the values for command options. @@ -2423,7 +2423,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_type_filter_add_options); + return llvm::ArrayRef(g_type_filter_add_options); } // Instance variables to hold the values for command options. @@ -2639,7 +2639,7 @@ ~CommandOptions() override = default; llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_type_lookup_options); + return llvm::ArrayRef(g_type_lookup_options); } Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp --- a/lldb/source/Commands/CommandObjectWatchpoint.cpp +++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp @@ -196,7 +196,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_watchpoint_list_options); + return llvm::ArrayRef(g_watchpoint_list_options); } // Instance variables to hold the values for command options. @@ -479,7 +479,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_watchpoint_delete_options); + return llvm::ArrayRef(g_watchpoint_delete_options); } // Instance variables to hold the values for command options. @@ -605,7 +605,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_watchpoint_ignore_options); + return llvm::ArrayRef(g_watchpoint_ignore_options); } // Instance variables to hold the values for command options. @@ -730,7 +730,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_watchpoint_modify_options); + return llvm::ArrayRef(g_watchpoint_modify_options); } // Instance variables to hold the values for command options. diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp --- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp @@ -349,7 +349,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_watchpoint_command_add_options); + return llvm::ArrayRef(g_watchpoint_command_add_options); } // Instance variables to hold the values for command options. diff --git a/lldb/source/Commands/CommandOptionsProcessLaunch.cpp b/lldb/source/Commands/CommandOptionsProcessLaunch.cpp --- a/lldb/source/Commands/CommandOptionsProcessLaunch.cpp +++ b/lldb/source/Commands/CommandOptionsProcessLaunch.cpp @@ -145,5 +145,5 @@ } llvm::ArrayRef CommandOptionsProcessLaunch::GetDefinitions() { - return llvm::makeArrayRef(g_process_launch_options); + return llvm::ArrayRef(g_process_launch_options); } diff --git a/lldb/source/Host/common/NativeProcessProtocol.cpp b/lldb/source/Host/common/NativeProcessProtocol.cpp --- a/lldb/source/Host/common/NativeProcessProtocol.cpp +++ b/lldb/source/Host/common/NativeProcessProtocol.cpp @@ -383,7 +383,7 @@ } const auto &saved = it->second.saved_opcodes; // Make sure the breakpoint opcode exists at this address - if (makeArrayRef(curr_break_op) != it->second.breakpoint_opcodes) { + if (llvm::ArrayRef(curr_break_op) != it->second.breakpoint_opcodes) { if (curr_break_op != it->second.saved_opcodes) return Status("Original breakpoint trap is no longer in memory."); LLDB_LOG(log, @@ -483,7 +483,7 @@ verify_bp_opcode_bytes.size(), verify_bytes_read); } - if (llvm::makeArrayRef(verify_bp_opcode_bytes.data(), verify_bytes_read) != + if (llvm::ArrayRef(verify_bp_opcode_bytes.data(), verify_bytes_read) != *expected_trap) { return llvm::createStringError( llvm::inconvertibleErrorCode(), @@ -514,39 +514,39 @@ switch (GetArchitecture().GetMachine()) { case llvm::Triple::aarch64: case llvm::Triple::aarch64_32: - return llvm::makeArrayRef(g_aarch64_opcode); + return llvm::ArrayRef(g_aarch64_opcode); case llvm::Triple::x86: case llvm::Triple::x86_64: - return llvm::makeArrayRef(g_i386_opcode); + return llvm::ArrayRef(g_i386_opcode); case llvm::Triple::mips: case llvm::Triple::mips64: - return llvm::makeArrayRef(g_mips64_opcode); + return llvm::ArrayRef(g_mips64_opcode); case llvm::Triple::mipsel: case llvm::Triple::mips64el: - return llvm::makeArrayRef(g_mips64el_opcode); + return llvm::ArrayRef(g_mips64el_opcode); case llvm::Triple::systemz: - return llvm::makeArrayRef(g_s390x_opcode); + return llvm::ArrayRef(g_s390x_opcode); case llvm::Triple::ppc: case llvm::Triple::ppc64: - return llvm::makeArrayRef(g_ppc_opcode); + return llvm::ArrayRef(g_ppc_opcode); case llvm::Triple::ppc64le: - return llvm::makeArrayRef(g_ppcle_opcode); + return llvm::ArrayRef(g_ppcle_opcode); case llvm::Triple::riscv32: case llvm::Triple::riscv64: { - return size_hint == 2 ? llvm::makeArrayRef(g_riscv_opcode_c) - : llvm::makeArrayRef(g_riscv_opcode); + return size_hint == 2 ? llvm::ArrayRef(g_riscv_opcode_c) + : llvm::ArrayRef(g_riscv_opcode); } case llvm::Triple::loongarch32: case llvm::Triple::loongarch64: - return llvm::makeArrayRef(g_loongarch_opcode); + return llvm::ArrayRef(g_loongarch_opcode); default: return llvm::createStringError(llvm::inconvertibleErrorCode(), @@ -653,7 +653,7 @@ llvm::makeMutableArrayRef(static_cast(buf), bytes_read); for (const auto &pair : m_software_breakpoints) { lldb::addr_t bp_addr = pair.first; - auto saved_opcodes = makeArrayRef(pair.second.saved_opcodes); + auto saved_opcodes = llvm::ArrayRef(pair.second.saved_opcodes); if (bp_addr + saved_opcodes.size() < addr || addr + bytes_read <= bp_addr) continue; // Breakpoint not in range, ignore diff --git a/lldb/source/Interpreter/OptionGroupArchitecture.cpp b/lldb/source/Interpreter/OptionGroupArchitecture.cpp --- a/lldb/source/Interpreter/OptionGroupArchitecture.cpp +++ b/lldb/source/Interpreter/OptionGroupArchitecture.cpp @@ -20,7 +20,7 @@ }; llvm::ArrayRef OptionGroupArchitecture::GetDefinitions() { - return llvm::makeArrayRef(g_option_table); + return llvm::ArrayRef(g_option_table); } bool OptionGroupArchitecture::GetArchitecture(Platform *platform, diff --git a/lldb/source/Interpreter/OptionGroupFormat.cpp b/lldb/source/Interpreter/OptionGroupFormat.cpp --- a/lldb/source/Interpreter/OptionGroupFormat.cpp +++ b/lldb/source/Interpreter/OptionGroupFormat.cpp @@ -58,7 +58,7 @@ } llvm::ArrayRef OptionGroupFormat::GetDefinitions() { - auto result = llvm::makeArrayRef(m_option_definitions); + auto result = llvm::ArrayRef(m_option_definitions); if (m_byte_size.GetDefaultValue() < UINT64_MAX) { if (m_count.GetDefaultValue() < UINT64_MAX) return result; diff --git a/lldb/source/Interpreter/OptionGroupMemoryTag.cpp b/lldb/source/Interpreter/OptionGroupMemoryTag.cpp --- a/lldb/source/Interpreter/OptionGroupMemoryTag.cpp +++ b/lldb/source/Interpreter/OptionGroupMemoryTag.cpp @@ -32,7 +32,7 @@ : "Include memory tags in output."} {} llvm::ArrayRef OptionGroupMemoryTag::GetDefinitions() { - return llvm::makeArrayRef(m_option_definition); + return llvm::ArrayRef(m_option_definition); } Status diff --git a/lldb/source/Interpreter/OptionGroupOutputFile.cpp b/lldb/source/Interpreter/OptionGroupOutputFile.cpp --- a/lldb/source/Interpreter/OptionGroupOutputFile.cpp +++ b/lldb/source/Interpreter/OptionGroupOutputFile.cpp @@ -27,7 +27,7 @@ }; llvm::ArrayRef OptionGroupOutputFile::GetDefinitions() { - return llvm::makeArrayRef(g_option_table); + return llvm::ArrayRef(g_option_table); } Status diff --git a/lldb/source/Interpreter/OptionGroupUUID.cpp b/lldb/source/Interpreter/OptionGroupUUID.cpp --- a/lldb/source/Interpreter/OptionGroupUUID.cpp +++ b/lldb/source/Interpreter/OptionGroupUUID.cpp @@ -19,7 +19,7 @@ }; llvm::ArrayRef OptionGroupUUID::GetDefinitions() { - return llvm::makeArrayRef(g_option_table); + return llvm::ArrayRef(g_option_table); } Status OptionGroupUUID::SetOptionValue(uint32_t option_idx, diff --git a/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp b/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp --- a/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp +++ b/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp @@ -62,7 +62,7 @@ llvm::ArrayRef OptionGroupValueObjectDisplay::GetDefinitions() { - return llvm::makeArrayRef(g_option_table); + return llvm::ArrayRef(g_option_table); } Status OptionGroupValueObjectDisplay::SetOptionValue( diff --git a/lldb/source/Interpreter/OptionGroupVariable.cpp b/lldb/source/Interpreter/OptionGroupVariable.cpp --- a/lldb/source/Interpreter/OptionGroupVariable.cpp +++ b/lldb/source/Interpreter/OptionGroupVariable.cpp @@ -131,7 +131,7 @@ #define NUM_FRAME_OPTS 3 llvm::ArrayRef OptionGroupVariable::GetDefinitions() { - auto result = llvm::makeArrayRef(g_variable_options); + auto result = llvm::ArrayRef(g_variable_options); // Show the "--no-args", "--no-locals" and "--show-globals" options if we are // showing frame specific options if (include_frame_options) diff --git a/lldb/source/Interpreter/OptionGroupWatchpoint.cpp b/lldb/source/Interpreter/OptionGroupWatchpoint.cpp --- a/lldb/source/Interpreter/OptionGroupWatchpoint.cpp +++ b/lldb/source/Interpreter/OptionGroupWatchpoint.cpp @@ -111,5 +111,5 @@ } llvm::ArrayRef OptionGroupWatchpoint::GetDefinitions() { - return llvm::makeArrayRef(g_option_table); + return llvm::ArrayRef(g_option_table); } diff --git a/lldb/source/Interpreter/OptionValueBoolean.cpp b/lldb/source/Interpreter/OptionValueBoolean.cpp --- a/lldb/source/Interpreter/OptionValueBoolean.cpp +++ b/lldb/source/Interpreter/OptionValueBoolean.cpp @@ -72,7 +72,7 @@ llvm::StringRef autocomplete_entries[] = {"true", "false", "on", "off", "yes", "no", "1", "0"}; - auto entries = llvm::makeArrayRef(autocomplete_entries); + auto entries = llvm::ArrayRef(autocomplete_entries); // only suggest "true" or "false" by default if (request.GetCursorArgumentPrefix().empty()) diff --git a/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp b/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp --- a/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp +++ b/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp @@ -271,7 +271,7 @@ reg_value[byte_index++] = 0; } - RegisterValue reg_val_obj(llvm::makeArrayRef(reg_value, reg_size), + RegisterValue reg_val_obj(llvm::ArrayRef(reg_value, reg_size), eByteOrderLittle); if (!reg_ctx->WriteRegister( reg_ctx->GetRegisterInfo(eRegisterKindGeneric, reg_index), diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -868,7 +868,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_objc_classtable_dump_options); + return llvm::ArrayRef(g_objc_classtable_dump_options); } OptionValueBoolean m_verbose; diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -4113,7 +4113,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_renderscript_reduction_bp_set_options); + return llvm::ArrayRef(g_renderscript_reduction_bp_set_options); } bool ParseReductionTypes(llvm::StringRef option_val, @@ -4265,7 +4265,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_renderscript_kernel_bp_set_options); + return llvm::ArrayRef(g_renderscript_kernel_bp_set_options); } RSCoordinate m_coord; @@ -4545,7 +4545,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_renderscript_runtime_alloc_dump_options); + return llvm::ArrayRef(g_renderscript_runtime_alloc_dump_options); } FileSpec m_outfile; @@ -4663,7 +4663,7 @@ void OptionParsingStarting(ExecutionContext *exe_ctx) override { m_id = 0; } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_renderscript_runtime_alloc_list_options); + return llvm::ArrayRef(g_renderscript_runtime_alloc_list_options); } uint32_t m_id = 0; diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -447,8 +447,8 @@ } static uint32_t calc_crc32(uint32_t init, const DataExtractor &data) { - return llvm::crc32( - init, llvm::makeArrayRef(data.GetDataStart(), data.GetByteSize())); + return llvm::crc32(init, + llvm::ArrayRef(data.GetDataStart(), data.GetByteSize())); } uint32_t ObjectFileELF::CalculateELFNotesSegmentsCRC32( diff --git a/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp b/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp --- a/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp +++ b/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp @@ -72,7 +72,7 @@ return std::nullopt; } - llvm::StringRef str = toStringRef(makeArrayRef(str_storage)); + llvm::StringRef str = toStringRef(llvm::ArrayRef(str_storage)); return ConstString(str); } diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp --- a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp +++ b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp @@ -417,9 +417,9 @@ case llvm::Triple::arm: switch (size_hint) { case 2: - return llvm::makeArrayRef(g_thumb_opcode); + return llvm::ArrayRef(g_thumb_opcode); case 4: - return llvm::makeArrayRef(g_arm_opcode); + return llvm::ArrayRef(g_arm_opcode); default: return llvm::createStringError(llvm::inconvertibleErrorCode(), "Unrecognised trap opcode size hint!"); diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -1513,9 +1513,9 @@ case llvm::Triple::arm: switch (size_hint) { case 2: - return llvm::makeArrayRef(g_thumb_opcode); + return llvm::ArrayRef(g_thumb_opcode); case 4: - return llvm::makeArrayRef(g_arm_opcode); + return llvm::ArrayRef(g_arm_opcode); default: return llvm::createStringError(llvm::inconvertibleErrorCode(), "Unrecognised trap opcode size hint!"); diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp b/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp --- a/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp @@ -217,9 +217,9 @@ if (m_opt_regsets.AnySet(eRegsetMaskDynamic)) { llvm::ArrayRef reg_infos_ref = - llvm::makeArrayRef(m_register_info_p, m_register_info_count); + llvm::ArrayRef(m_register_info_p, m_register_info_count); llvm::ArrayRef reg_sets_ref = - llvm::makeArrayRef(m_register_set_p, m_register_set_count); + llvm::ArrayRef(m_register_set_p, m_register_set_count); llvm::copy(reg_infos_ref, std::back_inserter(m_dynamic_reg_infos)); llvm::copy(reg_sets_ref, std::back_inserter(m_dynamic_reg_sets)); @@ -333,7 +333,7 @@ m_per_vq_reg_infos[sve_vq]; if (reg_info_ref.empty()) { - reg_info_ref = llvm::makeArrayRef(m_register_info_p, m_register_info_count); + reg_info_ref = llvm::ArrayRef(m_register_info_p, m_register_info_count); uint32_t offset = SVE_REGS_DEFAULT_OFFSET_LINUX; reg_info_ref[fpu_fpsr].byte_offset = offset; diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp --- a/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp @@ -295,11 +295,11 @@ switch (GetArchitecture().GetMachine()) { case llvm::Triple::aarch64: - return llvm::makeArrayRef(g_aarch64_opcode); + return llvm::ArrayRef(g_aarch64_opcode); case llvm::Triple::arm: case llvm::Triple::thumb: - return llvm::makeArrayRef(g_thumb_opcode); + return llvm::ArrayRef(g_thumb_opcode); default: return NativeProcessProtocol::GetSoftwareBreakpointTrapOpcode(size_hint); diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -2307,7 +2307,7 @@ // Build the reginfos response. StreamGDBRemote response; - RegisterValue reg_value(makeArrayRef(reg_bytes, reg_size), + RegisterValue reg_value(ArrayRef(reg_bytes, reg_size), m_current_process->GetArchitecture().GetByteOrder()); Status error = reg_context.WriteRegister(reg_info, reg_value); if (error.Fail()) { diff --git a/lldb/source/Plugins/Process/minidump/MinidumpTypes.cpp b/lldb/source/Plugins/Process/minidump/MinidumpTypes.cpp --- a/lldb/source/Plugins/Process/minidump/MinidumpTypes.cpp +++ b/lldb/source/Plugins/Process/minidump/MinidumpTypes.cpp @@ -72,7 +72,7 @@ return {}; return std::make_pair( - llvm::makeArrayRef( + llvm::ArrayRef( reinterpret_cast(data.data()), *mem_ranges_count), *base_rva); diff --git a/lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp b/lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp --- a/lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp +++ b/lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp @@ -40,7 +40,7 @@ bool ScriptedProcess::IsScriptLanguageSupported(lldb::ScriptLanguage language) { llvm::ArrayRef supported_languages = - llvm::makeArrayRef(g_supported_script_languages); + llvm::ArrayRef(g_supported_script_languages); return llvm::is_contained(supported_languages, language); } diff --git a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp --- a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp +++ b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp @@ -557,7 +557,7 @@ } llvm::ArrayRef GetDefinitions() override { - return llvm::makeArrayRef(g_enable_option_table); + return llvm::ArrayRef(g_enable_option_table); } StructuredData::DictionarySP BuildConfigurationData(bool enabled) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.cpp --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.cpp @@ -22,8 +22,8 @@ } llvm::DWARFDataExtractor DWARFDataExtractor::GetAsLLVM() const { - return llvm::DWARFDataExtractor( - llvm::makeArrayRef(GetDataStart(), GetByteSize()), - GetByteOrder() == lldb::eByteOrderLittle, GetAddressByteSize()); + return llvm::DWARFDataExtractor(llvm::ArrayRef(GetDataStart(), GetByteSize()), + GetByteOrder() == lldb::eByteOrderLittle, + GetAddressByteSize()); } } // namespace lldb_private diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp --- a/lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp +++ b/lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp @@ -249,7 +249,7 @@ Value.U = constant.getZExtValue(); } - bytes = llvm::makeArrayRef(reinterpret_cast(&Value), 8) + bytes = llvm::ArrayRef(reinterpret_cast(&Value), 8) .take_front(size); buffer->CopyData(bytes.data(), size); DataExtractor extractor(buffer, lldb::eByteOrderLittle, address_size); diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp --- a/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp +++ b/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp @@ -1189,7 +1189,7 @@ llvm::cantFail( TypeDeserializer::deserializeAs(args_cvt, args)); - llvm::ArrayRef arg_indices = llvm::makeArrayRef(args.ArgIndices); + llvm::ArrayRef arg_indices = llvm::ArrayRef(args.ArgIndices); bool is_variadic = IsCVarArgsFunction(arg_indices); if (is_variadic) arg_indices = arg_indices.drop_back(); diff --git a/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp b/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp --- a/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp +++ b/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp @@ -70,7 +70,7 @@ llvm::ArrayRef CommandObjectThreadTraceStartIntelPT::CommandOptions::GetDefinitions() { - return llvm::makeArrayRef(g_thread_trace_start_intel_pt_options); + return llvm::ArrayRef(g_thread_trace_start_intel_pt_options); } bool CommandObjectThreadTraceStartIntelPT::DoExecuteOnThreads( @@ -155,7 +155,7 @@ llvm::ArrayRef CommandObjectProcessTraceStartIntelPT::CommandOptions::GetDefinitions() { - return llvm::makeArrayRef(g_process_trace_start_intel_pt_options); + return llvm::ArrayRef(g_process_trace_start_intel_pt_options); } bool CommandObjectProcessTraceStartIntelPT::DoExecute( diff --git a/lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp b/lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp --- a/lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp +++ b/lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp @@ -59,7 +59,7 @@ llvm::ArrayRef CommandObjectThreadTraceExportCTF::CommandOptions::GetDefinitions() { - return llvm::makeArrayRef(g_thread_trace_export_ctf_options); + return llvm::ArrayRef(g_thread_trace_export_ctf_options); } bool CommandObjectThreadTraceExportCTF::DoExecute(Args &command, diff --git a/lldb/source/Symbol/UnwindPlan.cpp b/lldb/source/Symbol/UnwindPlan.cpp --- a/lldb/source/Symbol/UnwindPlan.cpp +++ b/lldb/source/Symbol/UnwindPlan.cpp @@ -148,7 +148,7 @@ if (m_type == atDWARFExpression) s.PutChar('['); DumpDWARFExpr( - s, llvm::makeArrayRef(m_location.expr.opcodes, m_location.expr.length), + s, llvm::ArrayRef(m_location.expr.opcodes, m_location.expr.length), thread); if (m_type == atDWARFExpression) s.PutChar(']'); @@ -202,8 +202,7 @@ s.PutChar(']'); break; case isDWARFExpression: - DumpDWARFExpr(s, - llvm::makeArrayRef(m_value.expr.opcodes, m_value.expr.length), + DumpDWARFExpr(s, llvm::ArrayRef(m_value.expr.opcodes, m_value.expr.length), thread); break; case unspecified: diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp --- a/lldb/source/Target/Platform.cpp +++ b/lldb/source/Target/Platform.cpp @@ -1358,7 +1358,7 @@ }; llvm::ArrayRef OptionGroupPlatformRSync::GetDefinitions() { - return llvm::makeArrayRef(g_rsync_option_table); + return llvm::ArrayRef(g_rsync_option_table); } void OptionGroupPlatformRSync::OptionParsingStarting( @@ -1406,7 +1406,7 @@ } llvm::ArrayRef OptionGroupPlatformSSH::GetDefinitions() { - return llvm::makeArrayRef(g_ssh_option_table); + return llvm::ArrayRef(g_ssh_option_table); } void OptionGroupPlatformSSH::OptionParsingStarting( @@ -1439,7 +1439,7 @@ } llvm::ArrayRef OptionGroupPlatformCaching::GetDefinitions() { - return llvm::makeArrayRef(g_caching_option_table); + return llvm::ArrayRef(g_caching_option_table); } void OptionGroupPlatformCaching::OptionParsingStarting( diff --git a/lldb/source/Target/StackFrameRecognizer.cpp b/lldb/source/Target/StackFrameRecognizer.cpp --- a/lldb/source/Target/StackFrameRecognizer.cpp +++ b/lldb/source/Target/StackFrameRecognizer.cpp @@ -77,7 +77,7 @@ symbol_name = entry.symbol_regexp->GetText().str(); callback(entry.recognizer_id, entry.recognizer->GetName(), module_name, - llvm::makeArrayRef(ConstString(symbol_name)), true); + llvm::ArrayRef(ConstString(symbol_name)), true); } else { callback(entry.recognizer_id, entry.recognizer->GetName(), diff --git a/lldb/source/Utility/Args.cpp b/lldb/source/Utility/Args.cpp --- a/lldb/source/Utility/Args.cpp +++ b/lldb/source/Utility/Args.cpp @@ -312,7 +312,7 @@ assert(m_argv.size() == m_entries.size() + 1); assert(m_argv.back() == nullptr); m_argv.pop_back(); - for (auto arg : llvm::makeArrayRef(argv, argc)) { + for (auto arg : llvm::ArrayRef(argv, argc)) { m_entries.emplace_back(arg, '\0'); m_argv.push_back(m_entries.back().data()); } @@ -358,7 +358,7 @@ void Args::SetArguments(size_t argc, const char **argv) { Clear(); - auto args = llvm::makeArrayRef(argv, argc); + auto args = llvm::ArrayRef(argv, argc); m_entries.resize(argc); m_argv.resize(argc + 1); for (size_t i = 0; i < args.size(); ++i) { diff --git a/lldb/source/Utility/StringList.cpp b/lldb/source/Utility/StringList.cpp --- a/lldb/source/Utility/StringList.cpp +++ b/lldb/source/Utility/StringList.cpp @@ -108,7 +108,7 @@ if (m_strings.empty()) return {}; - auto args = llvm::makeArrayRef(m_strings); + auto args = llvm::ArrayRef(m_strings); llvm::StringRef prefix = args.front(); for (auto arg : args.drop_front()) { size_t count = 0; diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp --- a/lldb/tools/driver/Driver.cpp +++ b/lldb/tools/driver/Driver.cpp @@ -757,7 +757,7 @@ LLDBOptTable T; unsigned MissingArgIndex; unsigned MissingArgCount; - ArrayRef arg_arr = makeArrayRef(argv + 1, argc - 1); + ArrayRef arg_arr = ArrayRef(argv + 1, argc - 1); opt::InputArgList input_args = T.ParseArgs(arg_arr, MissingArgIndex, MissingArgCount); llvm::StringRef argv0 = llvm::sys::path::filename(argv[0]); diff --git a/lldb/tools/lldb-vscode/lldb-vscode.cpp b/lldb/tools/lldb-vscode/lldb-vscode.cpp --- a/lldb/tools/lldb-vscode/lldb-vscode.cpp +++ b/lldb/tools/lldb-vscode/lldb-vscode.cpp @@ -3227,7 +3227,7 @@ LLDBVSCodeOptTable T; unsigned MAI, MAC; - llvm::ArrayRef ArgsArr = llvm::makeArrayRef(argv + 1, argc); + llvm::ArrayRef ArgsArr = llvm::ArrayRef(argv + 1, argc); llvm::opt::InputArgList input_args = T.ParseArgs(ArgsArr, MAI, MAC); if (input_args.hasArg(OPT_help)) { diff --git a/lldb/unittests/TestingSupport/Host/NativeProcessTestUtils.h b/lldb/unittests/TestingSupport/Host/NativeProcessTestUtils.h --- a/lldb/unittests/TestingSupport/Host/NativeProcessTestUtils.h +++ b/lldb/unittests/TestingSupport/Host/NativeProcessTestUtils.h @@ -86,7 +86,7 @@ Status WriteMemory(addr_t Addr, const void *Buf, size_t Size, size_t &BytesWritten) /*override*/ { auto ExpectedBytes = this->WriteMemory( - Addr, llvm::makeArrayRef(static_cast(Buf), Size)); + Addr, llvm::ArrayRef(static_cast(Buf), Size)); if (!ExpectedBytes) { BytesWritten = 0; return Status(ExpectedBytes.takeError()); diff --git a/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp --- a/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp @@ -34,7 +34,6 @@ using llvm::cast; using llvm::dyn_cast; using llvm::isa; -using llvm::makeArrayRef; using llvm::ScopedHashTableScope; using llvm::SmallVector; using llvm::StringRef; @@ -226,8 +225,8 @@ } // Otherwise, this return operation has zero operands. - builder.create(location, expr ? makeArrayRef(expr) - : ArrayRef()); + builder.create(location, + expr ? ArrayRef(expr) : ArrayRef()); return mlir::success(); } @@ -267,7 +266,7 @@ // This is the actual attribute that holds the list of values for this // tensor literal. auto dataAttribute = - mlir::DenseElementsAttr::get(dataType, llvm::makeArrayRef(data)); + mlir::DenseElementsAttr::get(dataType, llvm::ArrayRef(data)); // Build the MLIR op `toy.constant`. This invokes the `ConstantOp::build` // method. diff --git a/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp --- a/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp @@ -34,7 +34,6 @@ using llvm::cast; using llvm::dyn_cast; using llvm::isa; -using llvm::makeArrayRef; using llvm::ScopedHashTableScope; using llvm::SmallVector; using llvm::StringRef; @@ -226,8 +225,8 @@ } // Otherwise, this return operation has zero operands. - builder.create(location, expr ? makeArrayRef(expr) - : ArrayRef()); + builder.create(location, + expr ? ArrayRef(expr) : ArrayRef()); return mlir::success(); } @@ -267,7 +266,7 @@ // This is the actual attribute that holds the list of values for this // tensor literal. auto dataAttribute = - mlir::DenseElementsAttr::get(dataType, llvm::makeArrayRef(data)); + mlir::DenseElementsAttr::get(dataType, llvm::ArrayRef(data)); // Build the MLIR op `toy.constant`. This invokes the `ConstantOp::build` // method. diff --git a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp --- a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp @@ -34,7 +34,6 @@ using llvm::cast; using llvm::dyn_cast; using llvm::isa; -using llvm::makeArrayRef; using llvm::ScopedHashTableScope; using llvm::SmallVector; using llvm::StringRef; @@ -230,8 +229,8 @@ } // Otherwise, this return operation has zero operands. - builder.create(location, expr ? makeArrayRef(expr) - : ArrayRef()); + builder.create(location, + expr ? ArrayRef(expr) : ArrayRef()); return mlir::success(); } @@ -271,7 +270,7 @@ // This is the actual attribute that holds the list of values for this // tensor literal. auto dataAttribute = - mlir::DenseElementsAttr::get(dataType, llvm::makeArrayRef(data)); + mlir::DenseElementsAttr::get(dataType, llvm::ArrayRef(data)); // Build the MLIR op `toy.constant`. This invokes the `ConstantOp::build` // method. diff --git a/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp b/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp --- a/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp +++ b/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp @@ -177,7 +177,7 @@ if (dimension == valueShape.size()) { rewriter.create( loc, rewriter.create(loc, *valueIt++), alloc, - llvm::makeArrayRef(indices)); + llvm::ArrayRef(indices)); return; } diff --git a/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp --- a/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp @@ -34,7 +34,6 @@ using llvm::cast; using llvm::dyn_cast; using llvm::isa; -using llvm::makeArrayRef; using llvm::ScopedHashTableScope; using llvm::SmallVector; using llvm::StringRef; @@ -230,8 +229,8 @@ } // Otherwise, this return operation has zero operands. - builder.create(location, expr ? makeArrayRef(expr) - : ArrayRef()); + builder.create(location, + expr ? ArrayRef(expr) : ArrayRef()); return mlir::success(); } @@ -271,7 +270,7 @@ // This is the actual attribute that holds the list of values for this // tensor literal. auto dataAttribute = - mlir::DenseElementsAttr::get(dataType, llvm::makeArrayRef(data)); + mlir::DenseElementsAttr::get(dataType, llvm::ArrayRef(data)); // Build the MLIR op `toy.constant`. This invokes the `ConstantOp::build` // method. diff --git a/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp b/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp --- a/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp +++ b/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp @@ -177,7 +177,7 @@ if (dimension == valueShape.size()) { rewriter.create( loc, rewriter.create(loc, *valueIt++), alloc, - llvm::makeArrayRef(indices)); + llvm::ArrayRef(indices)); return; } diff --git a/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp --- a/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp @@ -34,7 +34,6 @@ using llvm::cast; using llvm::dyn_cast; using llvm::isa; -using llvm::makeArrayRef; using llvm::ScopedHashTableScope; using llvm::SmallVector; using llvm::StringRef; @@ -230,8 +229,8 @@ } // Otherwise, this return operation has zero operands. - builder.create(location, expr ? makeArrayRef(expr) - : ArrayRef()); + builder.create(location, + expr ? ArrayRef(expr) : ArrayRef()); return mlir::success(); } @@ -271,7 +270,7 @@ // This is the actual attribute that holds the list of values for this // tensor literal. auto dataAttribute = - mlir::DenseElementsAttr::get(dataType, llvm::makeArrayRef(data)); + mlir::DenseElementsAttr::get(dataType, llvm::ArrayRef(data)); // Build the MLIR op `toy.constant`. This invokes the `ConstantOp::build` // method. diff --git a/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp b/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp --- a/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp +++ b/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp @@ -177,7 +177,7 @@ if (dimension == valueShape.size()) { rewriter.create( loc, rewriter.create(loc, *valueIt++), alloc, - llvm::makeArrayRef(indices)); + llvm::ArrayRef(indices)); return; } diff --git a/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp --- a/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp @@ -34,7 +34,6 @@ using llvm::cast; using llvm::dyn_cast; using llvm::isa; -using llvm::makeArrayRef; using llvm::ScopedHashTableScope; using llvm::SmallVector; using llvm::StringRef; @@ -363,8 +362,8 @@ } // Otherwise, this return operation has zero operands. - builder.create(location, expr ? makeArrayRef(expr) - : ArrayRef()); + builder.create(location, + expr ? ArrayRef(expr) : ArrayRef()); return mlir::success(); } @@ -401,7 +400,7 @@ // This is the actual attribute that holds the list of values for this // tensor literal. - return mlir::DenseElementsAttr::get(dataType, llvm::makeArrayRef(data)); + return mlir::DenseElementsAttr::get(dataType, llvm::ArrayRef(data)); } mlir::DenseElementsAttr getConstantAttr(NumberExprAST &lit) { // The type of this attribute is tensor of 64-bit floating-point with no @@ -412,7 +411,7 @@ // This is the actual attribute that holds the list of values for this // tensor literal. return mlir::DenseElementsAttr::get(dataType, - llvm::makeArrayRef(lit.getValue())); + llvm::ArrayRef(lit.getValue())); } /// Emit a constant for a struct literal. It will be emitted as an array of /// other literals in an Attribute attached to a `toy.struct_constant` diff --git a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td --- a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td +++ b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td @@ -98,7 +98,7 @@ let builders = [OpBuilder<(ins "::mlir::Type":$result, "::mlir::Value":$lhs, "::mlir::Value":$rhs, "/*optional*/ ::mlir::StringAttr":$error), [{ - build($_builder, $_state, result, ::llvm::makeArrayRef({lhs, rhs}), + build($_builder, $_state, result, ::llvm::ArrayRef({lhs, rhs}), error); }]> ]; @@ -211,7 +211,7 @@ // Convenience builder alias for the binary version. let builders = [ OpBuilder<(ins "::mlir::Value":$lhs, "::mlir::Value":$rhs), - [{ build($_builder, $_state, ::llvm::makeArrayRef({lhs, rhs})); }]>, + [{ build($_builder, $_state, ::llvm::ArrayRef({lhs, rhs})); }]>, ]; let assemblyFormat = "$shapes attr-dict `:` type($shapes)"; @@ -277,7 +277,7 @@ let builders = [ OpBuilder<(ins "::mlir::Value":$lhs, "::mlir::Value":$rhs), - [{ build($_builder, $_state, ::llvm::makeArrayRef({lhs, rhs})); }]>, + [{ build($_builder, $_state, ::llvm::ArrayRef({lhs, rhs})); }]>, ]; let hasFolder = 1; @@ -972,7 +972,7 @@ let builders = [ OpBuilder<(ins "::mlir::Value":$lhs, "::mlir::Value":$rhs), - [{ build($_builder, $_state, ::llvm::makeArrayRef({lhs, rhs})); }]>, + [{ build($_builder, $_state, ::llvm::ArrayRef({lhs, rhs})); }]>, ]; let hasCanonicalizer = 1; diff --git a/mlir/include/mlir/Dialect/Tosa/Utils/ShapeUtils.h b/mlir/include/mlir/Dialect/Tosa/Utils/ShapeUtils.h --- a/mlir/include/mlir/Dialect/Tosa/Utils/ShapeUtils.h +++ b/mlir/include/mlir/Dialect/Tosa/Utils/ShapeUtils.h @@ -68,7 +68,7 @@ Type getType() const { if (hasRank) - return RankedTensorType::get(llvm::makeArrayRef(sizes), dtype); + return RankedTensorType::get(llvm::ArrayRef(sizes), dtype); return UnrankedTensorType::get(dtype); } diff --git a/mlir/include/mlir/IR/AsmState.h b/mlir/include/mlir/IR/AsmState.h --- a/mlir/include/mlir/IR/AsmState.h +++ b/mlir/include/mlir/IR/AsmState.h @@ -144,8 +144,7 @@ /// known to be of the correct type. template ArrayRef getDataAs() const { - return llvm::makeArrayRef((const T *)data.data(), - data.size() / sizeof(T)); + return llvm::ArrayRef((const T *)data.data(), data.size() / sizeof(T)); } /// Return a mutable reference to the raw underlying data of this blob. diff --git a/mlir/include/mlir/IR/AttrTypeBase.td b/mlir/include/mlir/IR/AttrTypeBase.td --- a/mlir/include/mlir/IR/AttrTypeBase.td +++ b/mlir/include/mlir/IR/AttrTypeBase.td @@ -368,7 +368,7 @@ OptionalParameter<"::llvm::ArrayRef<" # arrayOf # ">", desc> { let allocator = [{$_dst = $_allocator.copyInto($_self);}]; let cppStorageType = "::llvm::SmallVector<" # arrayOf # ">"; - let comparator = "::llvm::makeArrayRef($_lhs) == ::llvm::makeArrayRef($_rhs)"; + let comparator = "::llvm::ArrayRef($_lhs) == ::llvm::ArrayRef($_rhs)"; } // For classes which require allocation and have their own allocateInto method. diff --git a/mlir/include/mlir/IR/BuiltinAttributes.h b/mlir/include/mlir/IR/BuiltinAttributes.h --- a/mlir/include/mlir/IR/BuiltinAttributes.h +++ b/mlir/include/mlir/IR/BuiltinAttributes.h @@ -125,7 +125,7 @@ is_valid_cpp_fp_type::value || detail::is_complex_t::value>> static DenseElementsAttr get(const ShapedType &type, T value) { - return get(type, llvm::makeArrayRef(value)); + return get(type, llvm::ArrayRef(value)); } /// Constructs a dense complex elements attribute from an array of complex @@ -911,7 +911,7 @@ /// simply wraps the DenseElementsAttr::get calls. template static DenseFPElementsAttr get(const ShapedType &type, Arg &&arg) { - return DenseElementsAttr::get(type, llvm::makeArrayRef(arg)) + return DenseElementsAttr::get(type, llvm::ArrayRef(arg)) .template cast(); } template @@ -953,7 +953,7 @@ /// simply wraps the DenseElementsAttr::get calls. template static DenseIntElementsAttr get(const ShapedType &type, Arg &&arg) { - return DenseElementsAttr::get(type, llvm::makeArrayRef(arg)) + return DenseElementsAttr::get(type, llvm::ArrayRef(arg)) .template cast(); } template diff --git a/mlir/include/mlir/IR/OpBase.td b/mlir/include/mlir/IR/OpBase.td --- a/mlir/include/mlir/IR/OpBase.td +++ b/mlir/include/mlir/IR/OpBase.td @@ -1363,7 +1363,7 @@ let constBuilderCall = "::mlir::DenseElementsAttr::get(" "::mlir::RankedTensorType::get({}, " "$_builder.getIntegerType(" # width # ")), " - "::llvm::makeArrayRef($0)).cast<::mlir::DenseIntElementsAttr>()"; + "::llvm::ArrayRef($0)).cast<::mlir::DenseIntElementsAttr>()"; } def I32ElementsAttr : SignlessIntElementsAttr<32>; @@ -1384,7 +1384,7 @@ let constBuilderCall = "::mlir::DenseIntElementsAttr::get(" "::mlir::RankedTensorType::get({" # !interleave(dims, ", ") # - "}, $_builder.getIntegerType(" # width # ")), ::llvm::makeArrayRef($0))"; + "}, $_builder.getIntegerType(" # width # ")), ::llvm::ArrayRef($0))"; } class RankedI32ElementsAttr dims> : @@ -1404,7 +1404,7 @@ // Note that this is only constructing scalar elements attribute. let constBuilderCall = "::mlir::DenseElementsAttr::get(" "::mlir::RankedTensorType::get({}, $_builder.getF" # width # "Type())," - "::llvm::makeArrayRef($0))"; + "::llvm::ArrayRef($0))"; let convertFromStorage = "$_self"; } @@ -1429,7 +1429,7 @@ let constBuilderCall = "::mlir::DenseElementsAttr::get(" "::mlir::RankedTensorType::get({" # !interleave(dims, ", ") # "}, $_builder.getF" # width # "Type()), " - "::llvm::makeArrayRef($0)).cast<::mlir::DenseFPElementsAttr>()"; + "::llvm::ArrayRef($0)).cast<::mlir::DenseFPElementsAttr>()"; let convertFromStorage = "$_self"; } diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -1251,8 +1251,7 @@ return op->emitOpError() << "expects parent op " << (sizeof...(ParentOpTypes) != 1 ? "to be one of '" : "'") - << llvm::makeArrayRef({ParentOpTypes::getOperationName()...}) - << "'"; + << llvm::ArrayRef({ParentOpTypes::getOperationName()...}) << "'"; } }; }; diff --git a/mlir/lib/Analysis/Presburger/PresburgerSpace.cpp b/mlir/lib/Analysis/Presburger/PresburgerSpace.cpp --- a/mlir/lib/Analysis/Presburger/PresburgerSpace.cpp +++ b/mlir/lib/Analysis/Presburger/PresburgerSpace.cpp @@ -170,10 +170,9 @@ "alignment."); ArrayRef kindAttachments = - makeArrayRef(identifiers) - .slice(getVarKindOffset(kind), getNumVarKind(kind)); + ArrayRef(identifiers).slice(getVarKindOffset(kind), getNumVarKind(kind)); ArrayRef otherKindAttachments = - makeArrayRef(other.identifiers) + ArrayRef(other.identifiers) .slice(other.getVarKindOffset(kind), other.getNumVarKind(kind)); return kindAttachments == otherKindAttachments; } diff --git a/mlir/lib/AsmParser/AsmParserState.cpp b/mlir/lib/AsmParser/AsmParserState.cpp --- a/mlir/lib/AsmParser/AsmParserState.cpp +++ b/mlir/lib/AsmParser/AsmParserState.cpp @@ -102,7 +102,7 @@ // Access State auto AsmParserState::getBlockDefs() const -> iterator_range { - return llvm::make_pointee_range(llvm::makeArrayRef(impl->blocks)); + return llvm::make_pointee_range(llvm::ArrayRef(impl->blocks)); } auto AsmParserState::getBlockDef(Block *block) const @@ -112,7 +112,7 @@ } auto AsmParserState::getOpDefs() const -> iterator_range { - return llvm::make_pointee_range(llvm::makeArrayRef(impl->operations)); + return llvm::make_pointee_range(llvm::ArrayRef(impl->operations)); } auto AsmParserState::getOpDef(Operation *op) const diff --git a/mlir/lib/AsmParser/AttributeParser.cpp b/mlir/lib/AsmParser/AttributeParser.cpp --- a/mlir/lib/AsmParser/AttributeParser.cpp +++ b/mlir/lib/AsmParser/AttributeParser.cpp @@ -575,7 +575,7 @@ return nullptr; if (isComplex) { // If this is a complex, treat the parsed values as complex values. - auto complexData = llvm::makeArrayRef( + auto complexData = llvm::ArrayRef( reinterpret_cast *>(intValues.data()), intValues.size() / 2); return DenseElementsAttr::get(type, complexData); @@ -589,7 +589,7 @@ return nullptr; if (isComplex) { // If this is a complex, treat the parsed values as complex values. - auto complexData = llvm::makeArrayRef( + auto complexData = llvm::ArrayRef( reinterpret_cast *>(floatValues.data()), floatValues.size() / 2); return DenseElementsAttr::get(type, complexData); diff --git a/mlir/lib/Bindings/Python/IRCore.cpp b/mlir/lib/Bindings/Python/IRCore.cpp --- a/mlir/lib/Bindings/Python/IRCore.cpp +++ b/mlir/lib/Bindings/Python/IRCore.cpp @@ -2496,7 +2496,7 @@ throw py::value_error("No caller frames provided"); MlirLocation caller = frames.back().get(); for (const PyLocation &frame : - llvm::reverse(llvm::makeArrayRef(frames).drop_back())) + llvm::reverse(llvm::ArrayRef(frames).drop_back())) caller = mlirLocationCallSiteGet(frame.get(), caller); return PyLocation(context->getRef(), mlirLocationCallSiteGet(callee.get(), caller)); diff --git a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp --- a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp +++ b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp @@ -919,8 +919,8 @@ if (failed(reader.parseVarInt(dataSize)) || failed(reader.parseBytes(dataSize, data))) return failure(); - result = llvm::makeArrayRef(reinterpret_cast(data.data()), - data.size()); + result = llvm::ArrayRef(reinterpret_cast(data.data()), + data.size()); return success(); } diff --git a/mlir/lib/CAPI/Dialect/Quant.cpp b/mlir/lib/CAPI/Dialect/Quant.cpp --- a/mlir/lib/CAPI/Dialect/Quant.cpp +++ b/mlir/lib/CAPI/Dialect/Quant.cpp @@ -167,7 +167,7 @@ int64_t storageTypeMax) { return wrap(quant::UniformQuantizedPerAxisType::get( flags, unwrap(storageType), unwrap(expressedType), - llvm::makeArrayRef(scales, nDims), llvm::makeArrayRef(zeroPoints, nDims), + llvm::ArrayRef(scales, nDims), llvm::ArrayRef(zeroPoints, nDims), quantizedDimension, storageTypeMin, storageTypeMax)); } diff --git a/mlir/lib/CAPI/IR/AffineMap.cpp b/mlir/lib/CAPI/IR/AffineMap.cpp --- a/mlir/lib/CAPI/IR/AffineMap.cpp +++ b/mlir/lib/CAPI/IR/AffineMap.cpp @@ -68,7 +68,7 @@ MlirAffineMap mlirAffineMapPermutationGet(MlirContext ctx, intptr_t size, unsigned *permutation) { return wrap(AffineMap::getPermutationMap( - llvm::makeArrayRef(permutation, static_cast(size)), unwrap(ctx))); + llvm::ArrayRef(permutation, static_cast(size)), unwrap(ctx))); } bool mlirAffineMapIsIdentity(MlirAffineMap affineMap) { diff --git a/mlir/lib/CAPI/IR/BuiltinAttributes.cpp b/mlir/lib/CAPI/IR/BuiltinAttributes.cpp --- a/mlir/lib/CAPI/IR/BuiltinAttributes.cpp +++ b/mlir/lib/CAPI/IR/BuiltinAttributes.cpp @@ -301,13 +301,13 @@ uint64_t *idxs) { return wrap(unwrap(attr) .cast() - .getValues()[llvm::makeArrayRef(idxs, rank)]); + .getValues()[llvm::ArrayRef(idxs, rank)]); } bool mlirElementsAttrIsValidIndex(MlirAttribute attr, intptr_t rank, uint64_t *idxs) { return unwrap(attr).cast().isValidIndex( - llvm::makeArrayRef(idxs, rank)); + llvm::ArrayRef(idxs, rank)); } int64_t mlirElementsAttrGetNumElements(MlirAttribute attr) { @@ -520,9 +520,8 @@ static MlirAttribute getDenseAttribute(MlirType shapedType, intptr_t numElements, const T *elements) { - return wrap( - DenseElementsAttr::get(unwrap(shapedType).cast(), - llvm::makeArrayRef(elements, numElements))); + return wrap(DenseElementsAttr::get(unwrap(shapedType).cast(), + llvm::ArrayRef(elements, numElements))); } MlirAttribute mlirDenseElementsAttrUInt8Get(MlirType shapedType, @@ -710,7 +709,7 @@ intptr_t numElements, const T *elements) { return wrap(U::get(unwrap(shapedType).cast(), unwrap(name), UnmanagedAsmResourceBlob::allocateInferAlign( - llvm::makeArrayRef(elements, numElements)))); + llvm::ArrayRef(elements, numElements)))); } MLIR_CAPI_EXPORTED MlirAttribute mlirUnmanagedDenseBoolResourceElementsAttrGet( diff --git a/mlir/lib/CAPI/IR/BuiltinTypes.cpp b/mlir/lib/CAPI/IR/BuiltinTypes.cpp --- a/mlir/lib/CAPI/IR/BuiltinTypes.cpp +++ b/mlir/lib/CAPI/IR/BuiltinTypes.cpp @@ -187,15 +187,14 @@ MlirType mlirVectorTypeGet(intptr_t rank, const int64_t *shape, MlirType elementType) { - return wrap( - VectorType::get(llvm::makeArrayRef(shape, static_cast(rank)), - unwrap(elementType))); + return wrap(VectorType::get(llvm::ArrayRef(shape, static_cast(rank)), + unwrap(elementType))); } MlirType mlirVectorTypeGetChecked(MlirLocation loc, intptr_t rank, const int64_t *shape, MlirType elementType) { return wrap(VectorType::getChecked( - unwrap(loc), llvm::makeArrayRef(shape, static_cast(rank)), + unwrap(loc), llvm::ArrayRef(shape, static_cast(rank)), unwrap(elementType))); } @@ -215,9 +214,9 @@ MlirType mlirRankedTensorTypeGet(intptr_t rank, const int64_t *shape, MlirType elementType, MlirAttribute encoding) { - return wrap(RankedTensorType::get( - llvm::makeArrayRef(shape, static_cast(rank)), unwrap(elementType), - unwrap(encoding))); + return wrap( + RankedTensorType::get(llvm::ArrayRef(shape, static_cast(rank)), + unwrap(elementType), unwrap(encoding))); } MlirType mlirRankedTensorTypeGetChecked(MlirLocation loc, intptr_t rank, @@ -225,7 +224,7 @@ MlirType elementType, MlirAttribute encoding) { return wrap(RankedTensorType::getChecked( - unwrap(loc), llvm::makeArrayRef(shape, static_cast(rank)), + unwrap(loc), llvm::ArrayRef(shape, static_cast(rank)), unwrap(elementType), unwrap(encoding))); } @@ -252,7 +251,7 @@ const int64_t *shape, MlirAttribute layout, MlirAttribute memorySpace) { return wrap(MemRefType::get( - llvm::makeArrayRef(shape, static_cast(rank)), unwrap(elementType), + llvm::ArrayRef(shape, static_cast(rank)), unwrap(elementType), mlirAttributeIsNull(layout) ? MemRefLayoutAttrInterface() : unwrap(layout).cast(), @@ -264,7 +263,7 @@ MlirAttribute layout, MlirAttribute memorySpace) { return wrap(MemRefType::getChecked( - unwrap(loc), llvm::makeArrayRef(shape, static_cast(rank)), + unwrap(loc), llvm::ArrayRef(shape, static_cast(rank)), unwrap(elementType), mlirAttributeIsNull(layout) ? MemRefLayoutAttrInterface() @@ -275,9 +274,9 @@ MlirType mlirMemRefTypeContiguousGet(MlirType elementType, intptr_t rank, const int64_t *shape, MlirAttribute memorySpace) { - return wrap(MemRefType::get( - llvm::makeArrayRef(shape, static_cast(rank)), unwrap(elementType), - MemRefLayoutAttrInterface(), unwrap(memorySpace))); + return wrap(MemRefType::get(llvm::ArrayRef(shape, static_cast(rank)), + unwrap(elementType), MemRefLayoutAttrInterface(), + unwrap(memorySpace))); } MlirType mlirMemRefTypeContiguousGetChecked(MlirLocation loc, @@ -285,7 +284,7 @@ const int64_t *shape, MlirAttribute memorySpace) { return wrap(MemRefType::getChecked( - unwrap(loc), llvm::makeArrayRef(shape, static_cast(rank)), + unwrap(loc), llvm::ArrayRef(shape, static_cast(rank)), unwrap(elementType), MemRefLayoutAttrInterface(), unwrap(memorySpace))); } diff --git a/mlir/lib/CAPI/IR/IntegerSet.cpp b/mlir/lib/CAPI/IR/IntegerSet.cpp --- a/mlir/lib/CAPI/IR/IntegerSet.cpp +++ b/mlir/lib/CAPI/IR/IntegerSet.cpp @@ -49,7 +49,7 @@ return wrap(IntegerSet::get( static_cast(numDims), static_cast(numSymbols), mlirConstraints, - llvm::makeArrayRef(eqFlags, static_cast(numConstraints)))); + llvm::ArrayRef(eqFlags, static_cast(numConstraints)))); } MlirIntegerSet diff --git a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp --- a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp +++ b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp @@ -275,7 +275,7 @@ auto integerSet = op.getIntegerSet(); Value zeroConstant = rewriter.create(loc, 0); SmallVector operands(op.getOperands()); - auto operandsRef = llvm::makeArrayRef(operands); + auto operandsRef = llvm::ArrayRef(operands); // Calculate cond as a conjunction without short-circuiting. Value cond = nullptr; @@ -419,7 +419,7 @@ LogicalResult matchAndRewrite(AffineDmaStartOp op, PatternRewriter &rewriter) const override { SmallVector operands(op.getOperands()); - auto operandsRef = llvm::makeArrayRef(operands); + auto operandsRef = llvm::ArrayRef(operands); // Expand affine map for DMA source memref. auto maybeExpandedSrcMap = expandAffineMap( diff --git a/mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp b/mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp --- a/mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp +++ b/mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp @@ -977,9 +977,9 @@ adaptor.getRhs()); Value sumResult = rewriter.create( - loc, result, llvm::makeArrayRef(0)); + loc, result, llvm::ArrayRef(0)); Value carryValue = rewriter.create( - loc, result, llvm::makeArrayRef(1)); + loc, result, llvm::ArrayRef(1)); // Convert the carry value to boolean. Value one = spirv::ConstantOp::getOne(dstElemTy, loc, rewriter); @@ -1002,9 +1002,9 @@ rewriter.create(loc, adaptor.getLhs(), adaptor.getRhs()); Value low = rewriter.create(loc, result, - llvm::makeArrayRef(0)); - Value high = rewriter.create( - loc, result, llvm::makeArrayRef(1)); + llvm::ArrayRef(0)); + Value high = rewriter.create(loc, result, + llvm::ArrayRef(1)); rewriter.replaceOp(op, {low, high}); return success(); diff --git a/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp b/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp --- a/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp +++ b/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp @@ -57,7 +57,7 @@ auto dataAttrType = RankedTensorType::get( {static_cast(elementVals.size())}, builder.getI8Type()); auto dataAttr = - DenseElementsAttr::get(dataAttrType, llvm::makeArrayRef(elementVals)); + DenseElementsAttr::get(dataAttrType, llvm::ArrayRef(elementVals)); auto arrayTy = LLVM::LLVMArrayType::get(IntegerType::get(ctx, 8), elementVals.size()); std::string symbolName = generateGlobalMsgSymbolName(moduleOp); diff --git a/mlir/lib/Conversion/LLVMCommon/MemRefBuilder.cpp b/mlir/lib/Conversion/LLVMCommon/MemRefBuilder.cpp --- a/mlir/lib/Conversion/LLVMCommon/MemRefBuilder.cpp +++ b/mlir/lib/Conversion/LLVMCommon/MemRefBuilder.cpp @@ -139,7 +139,7 @@ // Copy size values to stack-allocated memory. auto one = createIndexAttrConstant(builder, loc, indexType, 1); auto sizes = builder.create( - loc, value, llvm::makeArrayRef({kSizePosInMemRefDescriptor})); + loc, value, llvm::ArrayRef({kSizePosInMemRefDescriptor})); auto sizesPtr = builder.create(loc, arrayPtrTy, one, /*alignment=*/0); builder.create(loc, sizes, sizesPtr); diff --git a/mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp b/mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp --- a/mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp +++ b/mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp @@ -1534,7 +1534,7 @@ for (auto &en : llvm::enumerate(reassociation)) { rewriter.setInsertionPoint(op); auto dstIndex = en.index(); - ArrayRef ref = llvm::makeArrayRef(en.value()); + ArrayRef ref = llvm::ArrayRef(en.value()); while (srcShape[ref.back()] == 1 && ref.size() > 1) ref = ref.drop_back(); if (!ShapedType::isDynamic(srcShape[ref.back()]) || ref.size() == 1) { diff --git a/mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp b/mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp --- a/mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp +++ b/mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp @@ -335,7 +335,7 @@ // Reduce them. Value result = values.front(); - for (Value next : llvm::makeArrayRef(values).drop_front()) { + for (Value next : llvm::ArrayRef(values).drop_front()) { switch (reduceOp.getKind()) { #define INT_AND_FLOAT_CASE(kind, iop, fop) \ diff --git a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp --- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp +++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp @@ -3868,7 +3868,7 @@ return failure(); result.attributes.erase(tmpAttrStrName); llvm::append_range(flatExprs, map.getValue().getResults()); - auto operandsRef = llvm::makeArrayRef(mapOperands); + auto operandsRef = llvm::ArrayRef(mapOperands); auto dimsRef = operandsRef.take_front(map.getValue().getNumDims()); SmallVector dims(dimsRef.begin(), dimsRef.end()); diff --git a/mlir/lib/Dialect/Affine/Utils/Utils.cpp b/mlir/lib/Dialect/Affine/Utils/Utils.cpp --- a/mlir/lib/Dialect/Affine/Utils/Utils.cpp +++ b/mlir/lib/Dialect/Affine/Utils/Utils.cpp @@ -362,9 +362,9 @@ parallelReductions, [](const LoopReduction &red) { return red.kind; })); AffineParallelOp newPloop = outsideBuilder.create( loc, ValueRange(reducedValues).getTypes(), reductionKinds, - llvm::makeArrayRef(lowerBoundMap), lowerBoundOperands, - llvm::makeArrayRef(upperBoundMap), upperBoundOperands, - llvm::makeArrayRef(forOp.getStep())); + llvm::ArrayRef(lowerBoundMap), lowerBoundOperands, + llvm::ArrayRef(upperBoundMap), upperBoundOperands, + llvm::ArrayRef(forOp.getStep())); // Steal the body of the old affine for op. newPloop.getRegion().takeBody(forOp.getRegion()); Operation *yieldOp = &newPloop.getBody()->back(); diff --git a/mlir/lib/Dialect/Func/IR/FuncOps.cpp b/mlir/lib/Dialect/Func/IR/FuncOps.cpp --- a/mlir/lib/Dialect/Func/IR/FuncOps.cpp +++ b/mlir/lib/Dialect/Func/IR/FuncOps.cpp @@ -229,7 +229,7 @@ FuncOp FuncOp::create(Location location, StringRef name, FunctionType type, Operation::dialect_attr_range attrs) { SmallVector attrRef(attrs); - return create(location, name, type, llvm::makeArrayRef(attrRef)); + return create(location, name, type, llvm::ArrayRef(attrRef)); } FuncOp FuncOp::create(Location location, StringRef name, FunctionType type, ArrayRef attrs, diff --git a/mlir/lib/Dialect/GPU/Transforms/AllReduceLowering.cpp b/mlir/lib/Dialect/GPU/Transforms/AllReduceLowering.cpp --- a/mlir/lib/Dialect/GPU/Transforms/AllReduceLowering.cpp +++ b/mlir/lib/Dialect/GPU/Transforms/AllReduceLowering.cpp @@ -347,7 +347,7 @@ return SmallVector{ accumFactory(value, shuffleOp.getResult(0))}; }, - [&] { return llvm::makeArrayRef(value); }); + [&] { return llvm::ArrayRef(value); }); value = rewriter.getInsertionBlock()->getArgument(0); } return SmallVector{value}; diff --git a/mlir/lib/Dialect/GPU/Transforms/MemoryPromotion.cpp b/mlir/lib/Dialect/GPU/Transforms/MemoryPromotion.cpp --- a/mlir/lib/Dialect/GPU/Transforms/MemoryPromotion.cpp +++ b/mlir/lib/Dialect/GPU/Transforms/MemoryPromotion.cpp @@ -70,14 +70,14 @@ b, b.getLoc(), lbs, ubs, steps, [&](OpBuilder &b, Location loc, ValueRange loopIvs) { ivs.assign(loopIvs.begin(), loopIvs.end()); - auto activeIvs = llvm::makeArrayRef(ivs).take_back(rank); + auto activeIvs = llvm::ArrayRef(ivs).take_back(rank); Value loaded = b.create(loc, from, activeIvs); b.create(loc, loaded, to, activeIvs); }); // Map the innermost loops to threads in reverse order. for (const auto &en : - llvm::enumerate(llvm::reverse(llvm::makeArrayRef(ivs).take_back( + llvm::enumerate(llvm::reverse(llvm::ArrayRef(ivs).take_back( GPUDialect::getNumWorkgroupDimensions())))) { Value v = en.value(); auto loop = cast(v.getParentRegion()->getParentOp()); diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp --- a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp +++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp @@ -1033,7 +1033,7 @@ auto llvmFuncType = LLVM::LLVMFunctionType::get(llvmResultType, argTypes); auto wrappedFuncType = LLVM::LLVMPointerType::get(llvmFuncType); - auto funcArguments = llvm::makeArrayRef(operands).drop_front(); + auto funcArguments = llvm::ArrayRef(operands).drop_front(); // Make sure that the first operand (indirect callee) matches the wrapped // LLVM IR function type, and that the types of the other call operands diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp --- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp +++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp @@ -1097,7 +1097,7 @@ if (payloadOpName.has_value()) { addBodyWithPayloadOp(parser, result, payloadOpName.value(), payloadOpAttrs, - makeArrayRef(result.operands).drop_back()); + ArrayRef(result.operands).drop_back()); } else { SmallVector regionArgs; if (parser.parseArgumentList(regionArgs, OpAsmParser::Delimiter::Paren, @@ -1338,7 +1338,7 @@ if (payloadOpName.has_value()) { addBodyWithPayloadOp(parser, result, payloadOpName.value(), payloadOpAttrs, - makeArrayRef(result.operands), /*initFirst=*/true); + ArrayRef(result.operands), /*initFirst=*/true); } else { SmallVector regionArgs; if (parser.parseArgumentList(regionArgs, OpAsmParser::Delimiter::Paren, diff --git a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp --- a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp +++ b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp @@ -457,7 +457,7 @@ loc, /*inputs=*/from, /*outputs=*/to, - /*indexingMaps=*/llvm::makeArrayRef({id, id}), + /*indexingMaps=*/llvm::ArrayRef({id, id}), /*iteratorTypes=*/iteratorTypes, [](OpBuilder &b, Location loc, ValueRange args) { b.create(loc, args.front()); diff --git a/mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp b/mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp --- a/mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp +++ b/mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp @@ -97,7 +97,7 @@ // If input shape matches target vector width, we can just call the // user-provided compute function with the operands. - if (inputShape == llvm::makeArrayRef(vectorWidth)) + if (inputShape == llvm::ArrayRef(vectorWidth)) return compute(operands); // Check if the inner dimension has to be expanded, or we can directly iterate diff --git a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp --- a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp +++ b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp @@ -2290,7 +2290,7 @@ SmallVector resultStrides; resultStrides.reserve(reassociation.size()); for (const ReassociationIndices &reassoc : reassociation) { - ArrayRef ref = llvm::makeArrayRef(reassoc); + ArrayRef ref = llvm::ArrayRef(reassoc); while (srcShape[ref.back()] == 1 && ref.size() > 1) ref = ref.drop_back(); if (!ShapedType::isDynamic(srcShape[ref.back()]) || ref.size() == 1) { diff --git a/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp b/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp --- a/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp +++ b/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp @@ -1129,7 +1129,7 @@ return failure(); auto resultType = getElementPtrType( - type, llvm::makeArrayRef(result.operands).drop_front(), result.location); + type, llvm::ArrayRef(result.operands).drop_front(), result.location); if (!resultType) { return failure(); } @@ -4677,7 +4677,7 @@ return failure(); auto resultType = getElementPtrType( - type, llvm::makeArrayRef(state.operands).drop_front(2), state.location); + type, llvm::ArrayRef(state.operands).drop_front(2), state.location); if (!resultType) return failure(); diff --git a/mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp b/mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp --- a/mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp +++ b/mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp @@ -711,7 +711,7 @@ loc, integerType, builder.getI32IntegerAttr(offset)); auto addrOp = builder.create(loc, varOp); auto acOp = builder.create( - loc, addrOp, llvm::makeArrayRef({zeroOp, offsetOp})); + loc, addrOp, llvm::ArrayRef({zeroOp, offsetOp})); return builder.create(loc, acOp); } diff --git a/mlir/lib/Dialect/Shape/IR/Shape.cpp b/mlir/lib/Dialect/Shape/IR/Shape.cpp --- a/mlir/lib/Dialect/Shape/IR/Shape.cpp +++ b/mlir/lib/Dialect/Shape/IR/Shape.cpp @@ -1277,7 +1277,7 @@ FuncOp FuncOp::create(Location location, StringRef name, FunctionType type, Operation::dialect_attr_range attrs) { SmallVector attrRef(attrs); - return create(location, name, type, llvm::makeArrayRef(attrRef)); + return create(location, name, type, llvm::ArrayRef(attrRef)); } FuncOp FuncOp::create(Location location, StringRef name, FunctionType type, ArrayRef attrs, @@ -1853,7 +1853,7 @@ return failure(); auto shapeVec = llvm::to_vector<6>( operands[0].cast().getValues()); - auto shape = llvm::makeArrayRef(shapeVec); + auto shape = llvm::ArrayRef(shapeVec); auto splitPoint = operands[1].cast().getInt(); // Verify that the split point is in the correct range. // TODO: Constant fold to an "error". @@ -1975,7 +1975,7 @@ return failure(); // Resolve operands. - auto initVals = llvm::makeArrayRef(operands).drop_front(); + auto initVals = llvm::ArrayRef(operands).drop_front(); if (parser.resolveOperand(operands.front(), shapeOrExtentTensorType, result.operands) || parser.resolveOperands(initVals, result.types, parser.getNameLoc(), diff --git a/mlir/lib/Dialect/Tensor/Transforms/SplitPaddingPatterns.cpp b/mlir/lib/Dialect/Tensor/Transforms/SplitPaddingPatterns.cpp --- a/mlir/lib/Dialect/Tensor/Transforms/SplitPaddingPatterns.cpp +++ b/mlir/lib/Dialect/Tensor/Transforms/SplitPaddingPatterns.cpp @@ -69,7 +69,7 @@ cstZero)); } Value ifCond = eqZeroCmpVals.front(); - for (Value cmp : llvm::makeArrayRef(eqZeroCmpVals).drop_front()) + for (Value cmp : llvm::ArrayRef(eqZeroCmpVals).drop_front()) ifCond = rewriter.create(loc, ifCond, cmp); // Build the scf.if op itself. For the "then" branch, we can elide the diff --git a/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp b/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp --- a/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp +++ b/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp @@ -383,7 +383,7 @@ assert(segments[position].data() == nullptr && "results already set"); int64_t start = operations.size(); llvm::append_range(operations, ops); - segments[position] = makeArrayRef(operations).drop_front(start); + segments[position] = ArrayRef(operations).drop_front(start); } void transform::TransformResults::setParams( diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp --- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp +++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp @@ -1204,8 +1204,7 @@ /// Folding is only possible in the absence of an internal permutation in the /// result vector. bool canFold() { - return (sentinels == - makeArrayRef(extractPosition).drop_front(extractedRank)); + return (sentinels == ArrayRef(extractPosition).drop_front(extractedRank)); } // Helper to get the next defining op of interest. @@ -1281,7 +1280,7 @@ auto permutation = extractVector(nextTransposeOp.getTransp()); AffineMap m = inversePermutation( AffineMap::getPermutationMap(permutation, extractOp.getContext())); - extractPosition = applyPermutationMap(m, makeArrayRef(extractPosition)); + extractPosition = applyPermutationMap(m, ArrayRef(extractPosition)); return success(); } @@ -1290,8 +1289,8 @@ ExtractFromInsertTransposeChainState::handleInsertOpWithMatchingPos( Value &res) { auto insertedPos = extractVector(nextInsertOp.getPosition()); - if (makeArrayRef(insertedPos) != - llvm::makeArrayRef(extractPosition).take_front(extractedRank)) + if (ArrayRef(insertedPos) != + llvm::ArrayRef(extractPosition).take_front(extractedRank)) return failure(); // Case 2.a. early-exit fold. res = nextInsertOp.getSource(); @@ -1332,8 +1331,7 @@ OpBuilder b(extractOp.getContext()); extractOp->setAttr( extractOp.getPositionAttrName(), - b.getI64ArrayAttr( - makeArrayRef(extractPosition).take_front(extractedRank))); + b.getI64ArrayAttr(ArrayRef(extractPosition).take_front(extractedRank))); extractOp.getVectorMutable().assign(source); return extractOp.getResult(); } diff --git a/mlir/lib/ExecutionEngine/RocmRuntimeWrappers.cpp b/mlir/lib/ExecutionEngine/RocmRuntimeWrappers.cpp --- a/mlir/lib/ExecutionEngine/RocmRuntimeWrappers.cpp +++ b/mlir/lib/ExecutionEngine/RocmRuntimeWrappers.cpp @@ -146,7 +146,7 @@ std::rotate(denseStrides.begin(), denseStrides.begin() + 1, denseStrides.end()); denseStrides.back() = 1; - assert(strides == llvm::makeArrayRef(denseStrides)); + assert(strides == llvm::ArrayRef(denseStrides)); auto ptr = descriptor->data + descriptor->offset * elementSizeBytes; mgpuMemHostRegister(ptr, sizeBytes); diff --git a/mlir/lib/Interfaces/DataLayoutInterfaces.cpp b/mlir/lib/Interfaces/DataLayoutInterfaces.cpp --- a/mlir/lib/Interfaces/DataLayoutInterfaces.cpp +++ b/mlir/lib/Interfaces/DataLayoutInterfaces.cpp @@ -305,7 +305,7 @@ if (nonNullSpecs.empty()) return {}; return nonNullSpecs.back().combineWith( - llvm::makeArrayRef(nonNullSpecs).drop_back()); + llvm::ArrayRef(nonNullSpecs).drop_back()); } LogicalResult mlir::detail::verifyDataLayoutOp(Operation *op) { diff --git a/mlir/lib/TableGen/Format.cpp b/mlir/lib/TableGen/Format.cpp --- a/mlir/lib/TableGen/Format.cpp +++ b/mlir/lib/TableGen/Format.cpp @@ -185,7 +185,7 @@ s << repl.spec << kMarkerForNoSubst; continue; } - auto range = llvm::makeArrayRef(adapters); + auto range = llvm::ArrayRef(adapters); range = range.drop_front(repl.index); if (repl.end != FmtReplacement::kUnset) range = range.drop_back(adapters.size() - repl.end); diff --git a/mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp b/mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp --- a/mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp +++ b/mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp @@ -856,7 +856,7 @@ } ArrayRef returnTypes; if (!isVoidType(returnType)) { - returnTypes = llvm::makeArrayRef(returnType); + returnTypes = llvm::ArrayRef(returnType); } typeMap[operands[0]] = FunctionType::get(context, argTypes, returnTypes); return success(); diff --git a/mlir/lib/Target/SPIRV/TranslateRegistration.cpp b/mlir/lib/Target/SPIRV/TranslateRegistration.cpp --- a/mlir/lib/Target/SPIRV/TranslateRegistration.cpp +++ b/mlir/lib/Target/SPIRV/TranslateRegistration.cpp @@ -49,8 +49,8 @@ return {}; } - auto binary = llvm::makeArrayRef(reinterpret_cast(start), - size / sizeof(uint32_t)); + auto binary = llvm::ArrayRef(reinterpret_cast(start), + size / sizeof(uint32_t)); return spirv::deserialize(binary, context); } diff --git a/mlir/lib/Tools/PDLL/AST/NodePrinter.cpp b/mlir/lib/Tools/PDLL/AST/NodePrinter.cpp --- a/mlir/lib/Tools/PDLL/AST/NodePrinter.cpp +++ b/mlir/lib/Tools/PDLL/AST/NodePrinter.cpp @@ -107,7 +107,7 @@ if (elementIndentStack.empty()) return; - for (bool isLastElt : llvm::makeArrayRef(elementIndentStack).drop_back()) + for (bool isLastElt : llvm::ArrayRef(elementIndentStack).drop_back()) os << (isLastElt ? " " : " |"); os << (elementIndentStack.back() ? " `" : " |"); } diff --git a/mlir/lib/Tools/PDLL/AST/TypeDetail.h b/mlir/lib/Tools/PDLL/AST/TypeDetail.h --- a/mlir/lib/Tools/PDLL/AST/TypeDetail.h +++ b/mlir/lib/Tools/PDLL/AST/TypeDetail.h @@ -115,9 +115,9 @@ std::pair, ArrayRef> key) { SmallVector names = llvm::to_vector(llvm::map_range( key.second, [&](StringRef name) { return alloc.copyInto(name); })); - return new (alloc.allocate()) TupleTypeStorage( - std::make_pair(alloc.copyInto(key.first), - alloc.copyInto(llvm::makeArrayRef(names)))); + return new (alloc.allocate()) + TupleTypeStorage(std::make_pair(alloc.copyInto(key.first), + alloc.copyInto(llvm::ArrayRef(names)))); } }; diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp --- a/mlir/lib/Transforms/Utils/DialectConversion.cpp +++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp @@ -3364,7 +3364,7 @@ mlir::applyPartialConversion(Operation *op, ConversionTarget &target, const FrozenRewritePatternSet &patterns, DenseSet *unconvertedOps) { - return applyPartialConversion(llvm::makeArrayRef(op), target, patterns, + return applyPartialConversion(llvm::ArrayRef(op), target, patterns, unconvertedOps); } @@ -3380,7 +3380,7 @@ LogicalResult mlir::applyFullConversion(Operation *op, ConversionTarget &target, const FrozenRewritePatternSet &patterns) { - return applyFullConversion(llvm::makeArrayRef(op), target, patterns); + return applyFullConversion(llvm::ArrayRef(op), target, patterns); } //===----------------------------------------------------------------------===// @@ -3401,6 +3401,6 @@ const FrozenRewritePatternSet &patterns, DenseSet &convertedOps, function_ref notifyCallback) { - return applyAnalysisConversion(llvm::makeArrayRef(op), target, patterns, + return applyAnalysisConversion(llvm::ArrayRef(op), target, patterns, convertedOps, notifyCallback); } diff --git a/mlir/test/lib/Dialect/Test/TestDialect.cpp b/mlir/test/lib/Dialect/Test/TestDialect.cpp --- a/mlir/test/lib/Dialect/Test/TestDialect.cpp +++ b/mlir/test/lib/Dialect/Test/TestDialect.cpp @@ -945,8 +945,8 @@ // test.pretty_printed_region start end : // Else fallback to parsing the "non pretty-printed" version. if (!succeeded(parser.parseOptionalKeyword("start"))) - return parser.parseGenericOperationAfterOpName( - result, llvm::makeArrayRef(operands)); + return parser.parseGenericOperationAfterOpName(result, + llvm::ArrayRef(operands)); FailureOr parseOpNameInfo = parser.parseCustomOperationName(); if (failed(parseOpNameInfo)) diff --git a/mlir/test/lib/Dialect/Test/TestPatterns.cpp b/mlir/test/lib/Dialect/Test/TestPatterns.cpp --- a/mlir/test/lib/Dialect/Test/TestPatterns.cpp +++ b/mlir/test/lib/Dialect/Test/TestPatterns.cpp @@ -233,7 +233,7 @@ // Check if these transformations introduce visiting of operations that // are not in the `ops` set (The new created ops are valid). An invalid // operation will trigger the assertion while processing. - (void)applyOpPatternsAndFold(makeArrayRef(ops), std::move(patterns), + (void)applyOpPatternsAndFold(ArrayRef(ops), std::move(patterns), /*strict=*/true); } @@ -354,7 +354,7 @@ for (auto &op : getOperation().getBody().front()) ops.push_back(&op); // Generate test patterns for each, but skip terminator. - for (auto *op : llvm::makeArrayRef(ops).drop_back()) { + for (auto *op : llvm::ArrayRef(ops).drop_back()) { // Test create method of each of the Op classes below. The resultant // output would be in reverse order underneath `op` from which // the attributes and regions are used. diff --git a/mlir/test/mlir-tblgen/op-attribute.td b/mlir/test/mlir-tblgen/op-attribute.td --- a/mlir/test/mlir-tblgen/op-attribute.td +++ b/mlir/test/mlir-tblgen/op-attribute.td @@ -44,7 +44,7 @@ // DECL: static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() // DECL-NEXT: static ::llvm::StringRef attrNames[] = // DECL-SAME: {::llvm::StringRef("aAttr"), ::llvm::StringRef("bAttr"), ::llvm::StringRef("cAttr"), ::llvm::StringRef("dAttr")}; -// DECL-NEXT: return ::llvm::makeArrayRef(attrNames); +// DECL-NEXT: return ::llvm::ArrayRef(attrNames); // DECL: ::mlir::StringAttr getAAttrAttrName() // DECL-NEXT: return getAttributeNameForIndex(0); @@ -193,7 +193,7 @@ // DECL: static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() // DECL-NEXT: static ::llvm::StringRef attrNames[] = // DECL-SAME: {::llvm::StringRef("aAttr"), ::llvm::StringRef("bAttr"), ::llvm::StringRef("cAttr")}; -// DECL-NEXT: return ::llvm::makeArrayRef(attrNames); +// DECL-NEXT: return ::llvm::ArrayRef(attrNames); // DECL: ::mlir::StringAttr getAAttrAttrName() // DECL-NEXT: return getAttributeNameForIndex(0); diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp --- a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp +++ b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp @@ -658,7 +658,7 @@ os << ") {\n"; } else if (auto *param = dyn_cast(first)) { genVariableParser(param, ctx, os); - guardOn(llvm::makeArrayRef(param)); + guardOn(llvm::ArrayRef(param)); } else if (auto *params = dyn_cast(first)) { genParamsParser(params, ctx, os); guardOn(params->getParams()); @@ -852,7 +852,7 @@ MethodBody &os) { FormatElement *anchor = el->getAnchor(); if (auto *param = dyn_cast(anchor)) { - guardOnAny(ctx, os, llvm::makeArrayRef(param), el->isInverted()); + guardOnAny(ctx, os, llvm::ArrayRef(param), el->isInverted()); } else if (auto *params = dyn_cast(anchor)) { guardOnAny(ctx, os, params->getParams(), el->isInverted()); } else if (auto *strct = dyn_cast(anchor)) { diff --git a/mlir/tools/mlir-tblgen/FormatGen.h b/mlir/tools/mlir-tblgen/FormatGen.h --- a/mlir/tools/mlir-tblgen/FormatGen.h +++ b/mlir/tools/mlir-tblgen/FormatGen.h @@ -387,14 +387,14 @@ /// Return the `then` elements of the optional group. Drops the first /// `thenParseStart` whitespace elements if `parseable` is true. ArrayRef getThenElements(bool parseable = false) const { - return llvm::makeArrayRef(thenElements) + return llvm::ArrayRef(thenElements) .drop_front(parseable ? thenParseStart : 0); } /// Return the `else` elements of the optional group. Drops the first /// `elseParseStart` whitespace elements if `parseable` is true. ArrayRef getElseElements(bool parseable = false) const { - return llvm::makeArrayRef(elseElements) + return llvm::ArrayRef(elseElements) .drop_front(parseable ? elseParseStart : 0); } diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp --- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp +++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp @@ -902,7 +902,7 @@ [&](StringRef attrName) { body << "::llvm::StringRef(\"" << attrName << "\")"; }); - body << "};\n return ::llvm::makeArrayRef(attrNames);"; + body << "};\n return ::llvm::ArrayRef(attrNames);"; } // Emit the getAttributeNameForIndex methods. diff --git a/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp b/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp --- a/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp +++ b/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp @@ -893,11 +893,9 @@ populateBuilderLinesOperand(op, operandArgNames, builderLines); populateBuilderLinesAttr( - op, llvm::makeArrayRef(builderArgs).drop_front(numResultArgs), - builderLines); + op, llvm::ArrayRef(builderArgs).drop_front(numResultArgs), builderLines); populateBuilderLinesResult( - op, llvm::makeArrayRef(builderArgs).take_front(numResultArgs), - builderLines); + op, llvm::ArrayRef(builderArgs).take_front(numResultArgs), builderLines); populateBuilderLinesSuccessors(op, successorArgNames, builderLines); populateBuilderRegions(op, builderArgs, builderLines); diff --git a/mlir/unittests/IR/AttributeTest.cpp b/mlir/unittests/IR/AttributeTest.cpp --- a/mlir/unittests/IR/AttributeTest.cpp +++ b/mlir/unittests/IR/AttributeTest.cpp @@ -28,7 +28,7 @@ EXPECT_TRUE(splat.isSplat()); auto detectedSplat = - DenseElementsAttr::get(shape, llvm::makeArrayRef({splatElt, splatElt})); + DenseElementsAttr::get(shape, llvm::ArrayRef({splatElt, splatElt})); EXPECT_EQ(detectedSplat, splat); for (auto newValue : detectedSplat.template getValues()) @@ -220,7 +220,7 @@ Attribute value = IntegerAttr::get(intTy, elementValue); RankedTensorType shape = RankedTensorType::get({}, intTy); - auto attr = DenseElementsAttr::get(shape, llvm::makeArrayRef({elementValue})); + auto attr = DenseElementsAttr::get(shape, llvm::ArrayRef({elementValue})); EXPECT_TRUE(attr.getValues()[0] == value); } @@ -232,7 +232,7 @@ RankedTensorType shape = RankedTensorType::get({4}, intTy); auto attr = - DenseElementsAttr::get(shape, llvm::makeArrayRef({elementValue})) + DenseElementsAttr::get(shape, llvm::ArrayRef({elementValue})) .mapValues(boolTy, [](const APInt &x) { return x.isZero() ? APInt::getZero(1) : APInt::getAllOnes(1); }); @@ -249,7 +249,7 @@ RankedTensorType shape = RankedTensorType::get({4}, intTy); auto attr = - DenseElementsAttr::get(shape, llvm::makeArrayRef({elementValue})) + DenseElementsAttr::get(shape, llvm::ArrayRef({elementValue})) .mapValues(boolTy, [](const APInt &x) { return x.isZero() ? APInt::getZero(1) : APInt::getAllOnes(1); }); @@ -282,7 +282,7 @@ template static void checkNativeIntAccess(Builder &builder, size_t intWidth) { T data[] = {0, 1, 2}; - checkNativeAccess(builder.getContext(), llvm::makeArrayRef(data), + checkNativeAccess(builder.getContext(), llvm::ArrayRef(data), builder.getIntegerType(intWidth)); } @@ -294,7 +294,7 @@ // Bool bool boolData[] = {true, false, true}; checkNativeAccess( - &context, llvm::makeArrayRef(boolData), builder.getI1Type()); + &context, llvm::ArrayRef(boolData), builder.getI1Type()); // Unsigned integers checkNativeIntAccess(builder, 8); @@ -311,12 +311,12 @@ // Float float floatData[] = {0, 1, 2}; checkNativeAccess( - &context, llvm::makeArrayRef(floatData), builder.getF32Type()); + &context, llvm::ArrayRef(floatData), builder.getF32Type()); // Double double doubleData[] = {0, 1, 2}; checkNativeAccess( - &context, llvm::makeArrayRef(doubleData), builder.getF64Type()); + &context, llvm::ArrayRef(doubleData), builder.getF64Type()); } TEST(DenseResourceElementsAttrTest, CheckNoCast) { diff --git a/mlir/unittests/IR/SubElementInterfaceTest.cpp b/mlir/unittests/IR/SubElementInterfaceTest.cpp --- a/mlir/unittests/IR/SubElementInterfaceTest.cpp +++ b/mlir/unittests/IR/SubElementInterfaceTest.cpp @@ -29,7 +29,7 @@ SmallVector subAttrs; dictAttr.walkSubAttrs([&](Attribute attr) { subAttrs.push_back(attr); }); - EXPECT_EQ(llvm::makeArrayRef(subAttrs), + EXPECT_EQ(llvm::ArrayRef(subAttrs), ArrayRef({strAttr, trueAttr, falseAttr, boolArrayAttr})); }