}
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))
}
void perf2boltMode(int argc, char **argv) {
- cl::HideUnrelatedOptions(makeArrayRef(opts::Perf2BoltCategories));
+ cl::HideUnrelatedOptions(ArrayRef(opts::Perf2BoltCategories));
cl::AddExtraVersionPrinter(printBoltRevision);
cl::ParseCommandLineOptions(
argc, argv,
}
void boltDiffMode(int argc, char **argv) {
- cl::HideUnrelatedOptions(makeArrayRef(opts::BoltDiffCategories));
+ cl::HideUnrelatedOptions(ArrayRef(opts::BoltDiffCategories));
cl::AddExtraVersionPrinter(printBoltRevision);
cl::ParseCommandLineOptions(
argc, argv,
}
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);
}
int main(int argc, char **argv) {
- cl::HideUnrelatedOptions(makeArrayRef(opts::HeatmapCategories));
+ cl::HideUnrelatedOptions(ArrayRef(opts::HeatmapCategories));
cl::ParseCommandLineOptions(argc, argv, "");
if (opts::PerfData.empty()) {
}
int main(int argc, char **argv) {
- cl::HideUnrelatedOptions(makeArrayRef(VisibleCategories));
+ cl::HideUnrelatedOptions(ArrayRef(VisibleCategories));
cl::SetVersionPrinter(printVersion);
cl::ParseCommandLineOptions(argc, argv);
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<CXXConstructExpr>(E);
if (Construct->getNumArgs() > 0 &&
checkCallArgs(
Result.Context, Construct->getConstructor(),
Construct->getParenOrBraceRange().getBegin(),
- llvm::makeArrayRef(Construct->getArgs(), Construct->getNumArgs()));
+ llvm::ArrayRef(Construct->getArgs(), Construct->getNumArgs()));
}
}
{bugprone::SignalHandlerCheck::AsyncSafeFunctionSetKind::POSIX,
"POSIX"},
};
- return makeArrayRef(Mapping);
+ return ArrayRef(Mapping);
}
};
Mapping[] = {{concurrency::MtUnsafeCheck::FunctionSet::Posix, "posix"},
{concurrency::MtUnsafeCheck::FunctionSet::Glibc, "glibc"},
{concurrency::MtUnsafeCheck::FunctionSet::Any, "any"}};
- return makeArrayRef(Mapping);
+ return ArrayRef(Mapping);
}
};
static ArrayRef<BindArgument>
getForwardedArgumentList(const LambdaProperties &P) {
- ArrayRef<BindArgument> Args = makeArrayRef(P.BindArguments);
+ ArrayRef<BindArgument> Args = ArrayRef(P.BindArguments);
if (P.Callable.Type != CT_MemberFunction)
return Args;
emitCaptureList(LP, Result, Stream);
Stream << "]";
- ArrayRef<BindArgument> FunctionCallArgs = makeArrayRef(LP.BindArguments);
+ ArrayRef<BindArgument> FunctionCallArgs = ArrayRef(LP.BindArguments);
addPlaceholderArgs(LP, Stream, PermissiveParameterList);
Mapping[] = {{modernize::Confidence::CL_Reasonable, "reasonable"},
{modernize::Confidence::CL_Safe, "safe"},
{modernize::Confidence::CL_Risky, "risky"}};
- return makeArrayRef(Mapping);
+ return ArrayRef(Mapping);
}
};
{modernize::VariableNamer::NS_CamelBack, "camelBack"},
{modernize::VariableNamer::NS_LowerCase, "lower_case"},
{modernize::VariableNamer::NS_UpperCase, "UPPER_CASE"}};
- return makeArrayRef(Mapping);
+ return ArrayRef(Mapping);
}
};
"Camel_Snake_Case"},
{readability::IdentifierNamingCheck::CT_CamelSnakeBack,
"camel_Snake_Back"}};
- return llvm::makeArrayRef(Mapping);
+ return llvm::ArrayRef(Mapping);
}
template <>
{HungarianPrefixType::HPT_On, "On"},
{HungarianPrefixType::HPT_LowerCase, "LowerCase"},
{HungarianPrefixType::HPT_CamelCase, "CamelCase"}};
- return llvm::makeArrayRef(Mapping);
+ return llvm::ArrayRef(Mapping);
}
};
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
}
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,
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;
// 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)
DocumentSymbol Root;
Root.children = std::move(Syms);
Root.range = EntireFile;
- mergePragmas(Root, llvm::makeArrayRef(Pragmas));
+ mergePragmas(Root, llvm::ArrayRef(Pragmas));
return Root.children;
}
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 {
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 :
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.
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;
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),
std::make_unique<DirectoryBasedGlobalCompilationDatabase>(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<OverlayCDB>(
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) {
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
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.
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"))));
}
}
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) {
// Retrieves the trailing array.
llvm::ArrayRef<const ForestNode *> children(uint16_t Num) const {
- return llvm::makeArrayRef(reinterpret_cast<ForestNode *const *>(this + 1),
- Num);
+ return llvm::ArrayRef(reinterpret_cast<ForestNode *const *>(this + 1), Num);
}
llvm::MutableArrayRef<ForestNode *> children(uint16_t Num) {
return llvm::makeMutableArrayRef(reinterpret_cast<ForestNode **>(this + 1),
const ForestNode *Payload = nullptr;
llvm::ArrayRef<const Node *> parents() const {
- return llvm::makeArrayRef(reinterpret_cast<const Node *const *>(this + 1),
- ParentCount);
+ return llvm::ArrayRef(reinterpret_cast<const Node *const *>(this + 1),
+ ParentCount);
};
// Parents are stored as a trailing array of Node*.
};
// }
llvm::ArrayRef<RuleID> 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 {
// Looks up available recovery actions if we stopped parsing in this state.
llvm::ArrayRef<Recovery> 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
/*Start=*/Index, /*TerminalData*/ 0);
++Index;
NodeCount = Index;
- return llvm::makeArrayRef(Terminals, Index);
+ return llvm::ArrayRef(Terminals, Index);
}
} // namespace pseudo
Shifts.push_back({*S, H});
llvm::stable_sort(Shifts, llvm::less_first{});
- auto Rest = llvm::makeArrayRef(Shifts);
+ auto Rest = llvm::ArrayRef(Shifts);
llvm::SmallVector<const GSS::Node *> Parents;
while (!Rest.empty()) {
// Collect the batch of PendingShift that have compatible shift states.
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 {
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;
}
{Colours::Yellow, "Yellow"}, {Colours::Green, "Green"},
{Colours::Blue, "Blue"}, {Colours::Indigo, "Indigo"},
{Colours::Violet, "Violet"}};
- return makeArrayRef(Mapping);
+ return ArrayRef(Mapping);
}
};
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;
static int executeFC1Tool(llvm::SmallVectorImpl<const char *> &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.
llvm::ArrayRef<MemcpyConfiguration> getMemcpyConfigurations() {
static constexpr MemcpyConfiguration kMemcpyConfigurations[] = {
{__llvm_libc::memcpy, "__llvm_libc::memcpy"}};
- return llvm::makeArrayRef(kMemcpyConfigurations);
+ return llvm::ArrayRef(kMemcpyConfigurations);
}
llvm::ArrayRef<MemmoveConfiguration> getMemmoveConfigurations() {
static constexpr MemmoveConfiguration kMemmoveConfigurations[] = {
{__llvm_libc::memmove, "__llvm_libc::memmove"}};
- return llvm::makeArrayRef(kMemmoveConfigurations);
+ return llvm::ArrayRef(kMemmoveConfigurations);
}
llvm::ArrayRef<MemcmpOrBcmpConfiguration> getMemcmpConfigurations() {
static constexpr MemcmpOrBcmpConfiguration kMemcmpConfiguration[] = {
{__llvm_libc::memcmp, "__llvm_libc::memcmp"}};
- return llvm::makeArrayRef(kMemcmpConfiguration);
+ return llvm::ArrayRef(kMemcmpConfiguration);
}
llvm::ArrayRef<MemcmpOrBcmpConfiguration> getBcmpConfigurations() {
static constexpr MemcmpOrBcmpConfiguration kBcmpConfigurations[] = {
{__llvm_libc::bcmp, "__llvm_libc::bcmp"}};
- return llvm::makeArrayRef(kBcmpConfigurations);
+ return llvm::ArrayRef(kBcmpConfigurations);
}
llvm::ArrayRef<MemsetConfiguration> getMemsetConfigurations() {
static constexpr MemsetConfiguration kMemsetConfigurations[] = {
{__llvm_libc::memset, "__llvm_libc::memset"}};
- return llvm::makeArrayRef(kMemsetConfigurations);
+ return llvm::ArrayRef(kMemsetConfigurations);
}
llvm::ArrayRef<BzeroConfiguration> getBzeroConfigurations() {
static constexpr BzeroConfiguration kBzeroConfigurations[] = {
{__llvm_libc::bzero, "__llvm_libc::bzero"}};
- return llvm::makeArrayRef(kBzeroConfigurations);
+ return llvm::ArrayRef(kBzeroConfigurations);
}
CircularArrayRef<ParameterBatch::ParameterType>
generateBatch(size_t Iterations) {
randomize();
- return cycle(makeArrayRef(Parameters), Iterations);
+ return cycle(ArrayRef(Parameters), Iterations);
}
protected:
// {"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) {
Stream << kIndent << kIndent << Descriptors[I] << ",\n";
}
Stream << R"( };
- return makeArrayRef(kDescriptors);
+ return ArrayRef(kDescriptors);
}
)";
}
// {Wrap<memcpy_0x8661D80472487AB5>, "memcpy_0x8661D80472487AB5"},
// ...
// };
-// return llvm::makeArrayRef(kConfigurations);
+// return llvm::ArrayRef(kConfigurations);
// }
// The `Wrap` template function is provided in the `Main` function below.
<< " 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;
{"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
{Wrap<memcpy_0xE00E29EE73994E2B>, "memcpy_0xE00E29EE73994E2B"},
{Wrap<memcpy_0x7381B60C7BE75EF9>, "memcpy_0x7381B60C7BE75EF9"},
};
- return llvm::makeArrayRef(kConfigurations);
+ return llvm::ArrayRef(kConfigurations);
}
using MemcmpStub = int (*)(const char *, const char *, size_t);
static constexpr MemcmpOrBcmpConfiguration kConfigurations[] = {
{Wrap<memcmp_0x348D7BA6DB0EE033>, "memcmp_0x348D7BA6DB0EE033"},
};
- return llvm::makeArrayRef(kConfigurations);
+ return llvm::ArrayRef(kConfigurations);
}
llvm::ArrayRef<MemcmpOrBcmpConfiguration> getBcmpConfigurations() {
return {};
{Wrap<memset_0x71E761699B999863>, "memset_0x71E761699B999863"},
{Wrap<memset_0x3DF0F44E2ED6A50F>, "memset_0x3DF0F44E2ED6A50F"},
};
- return llvm::makeArrayRef(kConfigurations);
+ return llvm::ArrayRef(kConfigurations);
}
using BzeroStub = void (*)(char *, size_t);
static constexpr BzeroConfiguration kConfigurations[] = {
{Wrap<bzero_0x475977492C218AD4>, "bzero_0x475977492C218AD4"},
};
- return llvm::makeArrayRef(kConfigurations);
+ return llvm::ArrayRef(kConfigurations);
}
llvm::ArrayRef<MemmoveConfiguration> getMemmoveConfigurations() {
}
ArrayRef<coff_relocation> getRelocs() const {
- return llvm::makeArrayRef(relocsData, relocsSize);
+ return llvm::ArrayRef(relocsData, relocsSize);
}
// Reloc setter used by ARM range extension thunk insertion.
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;
}
// - source 0, type 1...
// - source 1, type 0...
std::vector<GHashCell> 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);
}
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
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.
static void addGlobalSymbol(pdb::GSIStreamBuilder &builder, uint16_t modIndex,
unsigned symOffset,
std::vector<uint8_t> &symStorage) {
- CVSymbol sym(makeArrayRef(symStorage));
+ CVSymbol sym{ArrayRef(symStorage)};
switch (sym.kind()) {
case SymbolKind::S_CONSTANT:
case SymbolKind::S_UDT:
// to stabilize it.
uint8_t *mem = bAlloc().Allocate<uint8_t>(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:
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) {
ons.Name = "* Linker *";
ons.Signature = 0;
- ArrayRef<StringRef> args = makeArrayRef(ctx.config.argv).drop_front();
+ ArrayRef<StringRef> args = ArrayRef(ctx.config.argv).drop_front();
std::string argStr = quote(args);
ebs.Fields.push_back("cwd");
SmallString<64> cwd;
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));
// 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;
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) +
// instructions and write [first,end).
auto *sec = make<InputSection>(
nullptr, SHF_ALLOC, SHT_PROGBITS, 4,
- makeArrayRef(reinterpret_cast<uint8_t *>(buf.data() + first),
- 4 * (buf.size() - first)),
+ ArrayRef(reinterpret_cast<uint8_t *>(buf.data() + first),
+ 4 * (buf.size() - first)),
".text");
ctx.inputSections.push_back(sec);
for (Defined *sym : defined) {
// Get st_value delta for symbols relative to this section from the previous
// iteration.
DenseMap<const Defined *, uint64_t> valueDelta;
- ArrayRef<SymbolAnchor> sa = makeArrayRef(aux.anchors);
+ ArrayRef<SymbolAnchor> 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))
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);
// The first two elements of versionDefinitions represent VER_NDX_LOCAL and
// VER_NDX_GLOBAL. This helper returns other elements.
static inline ArrayRef<VersionDefinition> namedVersionDefs() {
- return llvm::makeArrayRef(config->versionDefinitions).slice(2);
+ return llvm::ArrayRef(config->versionDefinitions).slice(2);
}
void errorOrWarn(const Twine &msg);
// 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);
});
ArrayRef<Symbol *> getLocalSymbols() {
if (numSymbols == 0)
return {};
- return llvm::makeArrayRef(symbols.get() + 1, firstGlobal - 1);
+ return llvm::ArrayRef(symbols.get() + 1, firstGlobal - 1);
}
ArrayRef<Symbol *> getGlobalSymbols() {
- return llvm::makeArrayRef(symbols.get() + firstGlobal,
- numSymbols - firstGlobal);
+ return llvm::ArrayRef(symbols.get() + firstGlobal,
+ numSymbols - firstGlobal);
}
MutableArrayRef<Symbol *> getMutableGlobalSymbols() {
return llvm::makeMutableArrayRef(symbols.get() + firstGlobal,
static ArrayRef<uint8_t> getSectionContents(ObjFile<ELFT> &file,
const typename ELFT::Shdr &hdr) {
if (hdr.sh_type == SHT_NOBITS)
- return makeArrayRef<uint8_t>(nullptr, hdr.sh_size);
+ return ArrayRef<uint8_t>(nullptr, hdr.sh_size);
return check(file.getObj().getSectionContents(hdr));
}
typename ELFT::Shdr shdr =
cast<ELFFileBase>(file)->getELFShdrs<ELFT>()[relSecIdx];
if (shdr.sh_type == SHT_REL) {
- ret.rels = makeArrayRef(reinterpret_cast<const typename ELFT::Rel *>(
- file->mb.getBufferStart() + shdr.sh_offset),
- shdr.sh_size / sizeof(typename ELFT::Rel));
+ ret.rels = ArrayRef(reinterpret_cast<const typename ELFT::Rel *>(
+ 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<const typename ELFT::Rela *>(
- file->mb.getBufferStart() + shdr.sh_offset),
- shdr.sh_size / sizeof(typename ELFT::Rela));
+ ret.relas = ArrayRef(reinterpret_cast<const typename ELFT::Rela *>(
+ file->mb.getBufferStart() + shdr.sh_offset),
+ shdr.sh_size / sizeof(typename ELFT::Rela));
}
return ret;
}
template <typename T> llvm::ArrayRef<T> getDataAs() const {
size_t s = content().size();
assert(s % sizeof(T) == 0);
- return llvm::makeArrayRef<T>((const T *)content().data(), s / sizeof(T));
+ return llvm::ArrayRef<T>((const T *)content().data(), s / sizeof(T));
}
protected:
// Split input into 1-MiB shards.
constexpr size_t shardSize = 1 << 20;
- auto shardsIn = split(makeArrayRef<uint8_t>(buf.get(), size), shardSize);
+ auto shardsIn = split(ArrayRef<uint8_t>(buf.get(), size), shardSize);
const size_t numShards = shardsIn.size();
// Compress shards and compute Alder-32 checksums. Use Z_SYNC_FLUSH for all
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
});
size_t numSymbols = 0;
- for (ArrayRef<GdbSymbol> v : makeArrayRef(symbols.get(), numShards))
+ for (ArrayRef<GdbSymbol> v : ArrayRef(symbols.get(), numShards))
numSymbols += v.size();
// The return type is a flattened vector, so we'll copy each vector
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;
}
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<InputSection *, int> 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);
}
});
// Write to the final output buffer.
- hashFn(hashBuf.data(), makeArrayRef(hashes.get(), hashesSize));
+ hashFn(hashBuf.data(), ArrayRef(hashes.get(), hashesSize));
}
template <class ELFT> void Writer<ELFT>::writeBuildId() {
#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.";
/// have a nullptr const char * at the end, as the size of the list is
/// embedded in the ArrayRef object.
llvm::ArrayRef<const char *> 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.
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) {
}
llvm::ArrayRef<llvm::StringRef> BreakpointID::GetRangeSpecifiers() {
- return llvm::makeArrayRef(g_range_specifiers);
+ return llvm::ArrayRef(g_range_specifiers);
}
void BreakpointID::GetDescription(Stream *s, lldb::DescriptionLevel level) {
~BreakpointOptionGroup() override = default;
llvm::ArrayRef<OptionDefinition> 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,
~BreakpointDummyOptionGroup() override = default;
llvm::ArrayRef<OptionDefinition> 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,
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
~BreakpointNameOptionGroup() override = default;
llvm::ArrayRef<OptionDefinition> 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,
~BreakpointAccessOptionGroup() override = default;
llvm::ArrayRef<OptionDefinition> 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 {
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_breakpoint_read_options);
+ return llvm::ArrayRef(g_breakpoint_read_options);
}
void HandleOptionArgumentCompletion(
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_source_options);
+ return llvm::ArrayRef(g_source_options);
}
// Instance variables to hold the values for command options.
~CommandOptions() override = default;
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_alias_options);
+ return llvm::ArrayRef(g_alias_options);
}
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_regex_options);
+ return llvm::ArrayRef(g_regex_options);
}
llvm::StringRef GetHelp() { return m_help; }
}
llvm::ArrayRef<OptionDefinition> 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;
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_diagnostics_dump_options);
+ return llvm::ArrayRef(g_diagnostics_dump_options);
}
FileSpec directory;
llvm::ArrayRef<OptionDefinition>
CommandObjectDisassemble::CommandOptions::GetDefinitions() {
- return llvm::makeArrayRef(g_disassemble_options);
+ return llvm::ArrayRef(g_disassemble_options);
}
// CommandObjectDisassemble
llvm::ArrayRef<OptionDefinition>
CommandObjectExpression::CommandOptions::GetDefinitions() {
- return llvm::makeArrayRef(g_expression_options);
+ return llvm::ArrayRef(g_expression_options);
}
CommandObjectExpression::CommandObjectExpression(
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_frame_diag_options);
+ return llvm::ArrayRef(g_frame_diag_options);
}
// Options.
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_frame_select_options);
+ return llvm::ArrayRef(g_frame_select_options);
}
std::optional<int32_t> relative_frame_offset;
}
llvm::ArrayRef<OptionDefinition> 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.
llvm::ArrayRef<OptionDefinition>
CommandObjectHelp::CommandOptions::GetDefinitions() {
- return llvm::makeArrayRef(g_help_options);
+ return llvm::ArrayRef(g_help_options);
}
bool CommandObjectHelp::DoExecute(Args &command, CommandReturnObject &result) {
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_log_enable_options);
+ return llvm::ArrayRef(g_log_enable_options);
}
FileSpec log_file;
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_log_dump_options);
+ return llvm::ArrayRef(g_log_dump_options);
}
FileSpec log_file;
~OptionGroupReadMemory() override = default;
llvm::ArrayRef<OptionDefinition> 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,
~OptionGroupFindMemory() override = default;
llvm::ArrayRef<OptionDefinition> 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,
~OptionGroupWriteMemory() override = default;
llvm::ArrayRef<OptionDefinition> 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,
~OptionGroupMemoryRegion() override = default;
llvm::ArrayRef<OptionDefinition> 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,
~OptionGroupTagWrite() override = default;
llvm::ArrayRef<OptionDefinition> 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,
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_permissions_options);
+ return llvm::ArrayRef(g_permissions_options);
}
// Instance variables to hold the values for command options.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
~CommandOptions() override = default;
llvm::ArrayRef<OptionDefinition> 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,
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_process_attach_options);
+ return llvm::ArrayRef(g_process_attach_options);
}
ProcessAttachInfo attach_info;
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_process_continue_options);
+ return llvm::ArrayRef(g_process_continue_options);
}
uint32_t m_ignore = 0;
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
~CommandOptions() override = default;
llvm::ArrayRef<OptionDefinition> 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,
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
~CommandOptions() override = default;
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_register_read_options);
+ return llvm::ArrayRef(g_register_read_options);
}
void OptionParsingStarting(ExecutionContext *execution_context) override {
llvm::ArrayRef<OptionDefinition>
CommandObjectScript::CommandOptions::GetDefinitions() {
- return llvm::makeArrayRef(g_script_options);
+ return llvm::ArrayRef(g_script_options);
}
CommandObjectScript::CommandObjectScript(CommandInterpreter &interpreter)
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_history_options);
+ return llvm::ArrayRef(g_history_options);
}
// Instance variables to hold the values for command options.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_settings_clear_options);
+ return llvm::ArrayRef(g_settings_clear_options);
}
bool m_clear_all = false;
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_statistics_dump_options);
+ return llvm::ArrayRef(g_statistics_dump_options);
}
bool m_all_targets = false;
~OptionGroupDependents() override = default;
llvm::ArrayRef<OptionDefinition> 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,
}
llvm::ArrayRef<OptionDefinition> 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;
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_target_modules_dump_options);
+ return llvm::ArrayRef(g_target_modules_dump_options);
}
bool m_verbose;
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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
~CommandOptions() override = default;
llvm::ArrayRef<OptionDefinition> 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,
}
llvm::ArrayRef<OptionDefinition> 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.
~ThreadStepScopeOptionGroup() override = default;
llvm::ArrayRef<OptionDefinition> 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,
}
llvm::ArrayRef<OptionDefinition> 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;
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_thread_info_options);
+ return llvm::ArrayRef(g_thread_info_options);
}
bool m_json_thread;
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_thread_return_options);
+ return llvm::ArrayRef(g_thread_return_options);
}
bool m_from_expression = false;
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_thread_jump_options);
+ return llvm::ArrayRef(g_thread_jump_options);
}
FileSpecList m_filenames;
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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;
}
llvm::ArrayRef<OptionDefinition> 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;
}
llvm::ArrayRef<OptionDefinition> 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.
};
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_trace_save_options);
+ return llvm::ArrayRef(g_trace_save_options);
};
bool m_compact;
}
ArrayRef<OptionDefinition> GetDefinitions() override {
- return makeArrayRef(g_trace_load_options);
+ return ArrayRef(g_trace_load_options);
}
bool m_verbose; // Enable verbose logging for debugging purposes.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
void OptionParsingStarting(ExecutionContext *execution_context) override;
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
~CommandOptions() override = default;
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_type_format_add_options);
+ return llvm::ArrayRef(g_type_format_add_options);
}
void OptionParsingStarting(ExecutionContext *execution_context) override {
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
~CommandOptions() override = default;
llvm::ArrayRef<OptionDefinition> 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,
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> 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.
}
llvm::ArrayRef<OptionDefinition> CommandOptionsProcessLaunch::GetDefinitions() {
- return llvm::makeArrayRef(g_process_launch_options);
+ return llvm::ArrayRef(g_process_launch_options);
}
}
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,
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(),
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(),
llvm::makeMutableArrayRef(static_cast<uint8_t *>(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
};
llvm::ArrayRef<OptionDefinition> OptionGroupArchitecture::GetDefinitions() {
- return llvm::makeArrayRef(g_option_table);
+ return llvm::ArrayRef(g_option_table);
}
bool OptionGroupArchitecture::GetArchitecture(Platform *platform,
}
llvm::ArrayRef<OptionDefinition> 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;
: "Include memory tags in output."} {}
llvm::ArrayRef<OptionDefinition> OptionGroupMemoryTag::GetDefinitions() {
- return llvm::makeArrayRef(m_option_definition);
+ return llvm::ArrayRef(m_option_definition);
}
Status
};
llvm::ArrayRef<OptionDefinition> OptionGroupOutputFile::GetDefinitions() {
- return llvm::makeArrayRef(g_option_table);
+ return llvm::ArrayRef(g_option_table);
}
Status
};
llvm::ArrayRef<OptionDefinition> OptionGroupUUID::GetDefinitions() {
- return llvm::makeArrayRef(g_option_table);
+ return llvm::ArrayRef(g_option_table);
}
Status OptionGroupUUID::SetOptionValue(uint32_t option_idx,
llvm::ArrayRef<OptionDefinition>
OptionGroupValueObjectDisplay::GetDefinitions() {
- return llvm::makeArrayRef(g_option_table);
+ return llvm::ArrayRef(g_option_table);
}
Status OptionGroupValueObjectDisplay::SetOptionValue(
#define NUM_FRAME_OPTS 3
llvm::ArrayRef<OptionDefinition> 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)
}
llvm::ArrayRef<OptionDefinition> OptionGroupWatchpoint::GetDefinitions() {
- return llvm::makeArrayRef(g_option_table);
+ return llvm::ArrayRef(g_option_table);
}
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())
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),
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_objc_classtable_dump_options);
+ return llvm::ArrayRef(g_objc_classtable_dump_options);
}
OptionValueBoolean m_verbose;
}
llvm::ArrayRef<OptionDefinition> 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,
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_renderscript_kernel_bp_set_options);
+ return llvm::ArrayRef(g_renderscript_kernel_bp_set_options);
}
RSCoordinate m_coord;
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_renderscript_runtime_alloc_dump_options);
+ return llvm::ArrayRef(g_renderscript_runtime_alloc_dump_options);
}
FileSpec m_outfile;
void OptionParsingStarting(ExecutionContext *exe_ctx) override { m_id = 0; }
llvm::ArrayRef<OptionDefinition> 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;
}
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(
return std::nullopt;
}
- llvm::StringRef str = toStringRef(makeArrayRef(str_storage));
+ llvm::StringRef str = toStringRef(llvm::ArrayRef(str_storage));
return ConstString(str);
}
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!");
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!");
if (m_opt_regsets.AnySet(eRegsetMaskDynamic)) {
llvm::ArrayRef<lldb_private::RegisterInfo> 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<lldb_private::RegisterSet> 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));
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;
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);
// 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()) {
return {};
return std::make_pair(
- llvm::makeArrayRef(
+ llvm::ArrayRef(
reinterpret_cast<const MinidumpMemoryDescriptor64 *>(data.data()),
*mem_ranges_count),
*base_rva);
bool ScriptedProcess::IsScriptLanguageSupported(lldb::ScriptLanguage language) {
llvm::ArrayRef<lldb::ScriptLanguage> supported_languages =
- llvm::makeArrayRef(g_supported_script_languages);
+ llvm::ArrayRef(g_supported_script_languages);
return llvm::is_contained(supported_languages, language);
}
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_enable_option_table);
+ return llvm::ArrayRef(g_enable_option_table);
}
StructuredData::DictionarySP BuildConfigurationData(bool enabled) {
}
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
Value.U = constant.getZExtValue();
}
- bytes = llvm::makeArrayRef(reinterpret_cast<const uint8_t *>(&Value), 8)
+ bytes = llvm::ArrayRef(reinterpret_cast<const uint8_t *>(&Value), 8)
.take_front(size);
buffer->CopyData(bytes.data(), size);
DataExtractor extractor(buffer, lldb::eByteOrderLittle, address_size);
llvm::cantFail(
TypeDeserializer::deserializeAs<ArgListRecord>(args_cvt, args));
- llvm::ArrayRef<TypeIndex> arg_indices = llvm::makeArrayRef(args.ArgIndices);
+ llvm::ArrayRef<TypeIndex> arg_indices = llvm::ArrayRef(args.ArgIndices);
bool is_variadic = IsCVarArgsFunction(arg_indices);
if (is_variadic)
arg_indices = arg_indices.drop_back();
llvm::ArrayRef<OptionDefinition>
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(
llvm::ArrayRef<OptionDefinition>
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(
llvm::ArrayRef<OptionDefinition>
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,
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(']');
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:
};
llvm::ArrayRef<OptionDefinition> OptionGroupPlatformRSync::GetDefinitions() {
- return llvm::makeArrayRef(g_rsync_option_table);
+ return llvm::ArrayRef(g_rsync_option_table);
}
void OptionGroupPlatformRSync::OptionParsingStarting(
}
llvm::ArrayRef<OptionDefinition> OptionGroupPlatformSSH::GetDefinitions() {
- return llvm::makeArrayRef(g_ssh_option_table);
+ return llvm::ArrayRef(g_ssh_option_table);
}
void OptionGroupPlatformSSH::OptionParsingStarting(
}
llvm::ArrayRef<OptionDefinition> OptionGroupPlatformCaching::GetDefinitions() {
- return llvm::makeArrayRef(g_caching_option_table);
+ return llvm::ArrayRef(g_caching_option_table);
}
void OptionGroupPlatformCaching::OptionParsingStarting(
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(),
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());
}
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) {
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;
LLDBOptTable T;
unsigned MissingArgIndex;
unsigned MissingArgCount;
- ArrayRef<const char *> arg_arr = makeArrayRef(argv + 1, argc - 1);
+ ArrayRef<const char *> 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]);
LLDBVSCodeOptTable T;
unsigned MAI, MAC;
- llvm::ArrayRef<const char *> ArgsArr = llvm::makeArrayRef(argv + 1, argc);
+ llvm::ArrayRef<const char *> ArgsArr = llvm::ArrayRef(argv + 1, argc);
llvm::opt::InputArgList input_args = T.ParseArgs(ArgsArr, MAI, MAC);
if (input_args.hasArg(OPT_help)) {
Status WriteMemory(addr_t Addr, const void *Buf, size_t Size,
size_t &BytesWritten) /*override*/ {
auto ExpectedBytes = this->WriteMemory(
- Addr, llvm::makeArrayRef(static_cast<const uint8_t *>(Buf), Size));
+ Addr, llvm::ArrayRef(static_cast<const uint8_t *>(Buf), Size));
if (!ExpectedBytes) {
BytesWritten = 0;
return Status(ExpectedBytes.takeError());
using llvm::cast;
using llvm::dyn_cast;
using llvm::isa;
-using llvm::makeArrayRef;
using llvm::ScopedHashTableScope;
using llvm::SmallVector;
using llvm::StringRef;
}
// Otherwise, this return operation has zero operands.
- builder.create<ReturnOp>(location, expr ? makeArrayRef(expr)
- : ArrayRef<mlir::Value>());
+ builder.create<ReturnOp>(location,
+ expr ? ArrayRef(expr) : ArrayRef<mlir::Value>());
return mlir::success();
}
// 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.
using llvm::cast;
using llvm::dyn_cast;
using llvm::isa;
-using llvm::makeArrayRef;
using llvm::ScopedHashTableScope;
using llvm::SmallVector;
using llvm::StringRef;
}
// Otherwise, this return operation has zero operands.
- builder.create<ReturnOp>(location, expr ? makeArrayRef(expr)
- : ArrayRef<mlir::Value>());
+ builder.create<ReturnOp>(location,
+ expr ? ArrayRef(expr) : ArrayRef<mlir::Value>());
return mlir::success();
}
// 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.
using llvm::cast;
using llvm::dyn_cast;
using llvm::isa;
-using llvm::makeArrayRef;
using llvm::ScopedHashTableScope;
using llvm::SmallVector;
using llvm::StringRef;
}
// Otherwise, this return operation has zero operands.
- builder.create<ReturnOp>(location, expr ? makeArrayRef(expr)
- : ArrayRef<mlir::Value>());
+ builder.create<ReturnOp>(location,
+ expr ? ArrayRef(expr) : ArrayRef<mlir::Value>());
return mlir::success();
}
// 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.
if (dimension == valueShape.size()) {
rewriter.create<AffineStoreOp>(
loc, rewriter.create<arith::ConstantOp>(loc, *valueIt++), alloc,
- llvm::makeArrayRef(indices));
+ llvm::ArrayRef(indices));
return;
}
using llvm::cast;
using llvm::dyn_cast;
using llvm::isa;
-using llvm::makeArrayRef;
using llvm::ScopedHashTableScope;
using llvm::SmallVector;
using llvm::StringRef;
}
// Otherwise, this return operation has zero operands.
- builder.create<ReturnOp>(location, expr ? makeArrayRef(expr)
- : ArrayRef<mlir::Value>());
+ builder.create<ReturnOp>(location,
+ expr ? ArrayRef(expr) : ArrayRef<mlir::Value>());
return mlir::success();
}
// 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.
if (dimension == valueShape.size()) {
rewriter.create<AffineStoreOp>(
loc, rewriter.create<arith::ConstantOp>(loc, *valueIt++), alloc,
- llvm::makeArrayRef(indices));
+ llvm::ArrayRef(indices));
return;
}
using llvm::cast;
using llvm::dyn_cast;
using llvm::isa;
-using llvm::makeArrayRef;
using llvm::ScopedHashTableScope;
using llvm::SmallVector;
using llvm::StringRef;
}
// Otherwise, this return operation has zero operands.
- builder.create<ReturnOp>(location, expr ? makeArrayRef(expr)
- : ArrayRef<mlir::Value>());
+ builder.create<ReturnOp>(location,
+ expr ? ArrayRef(expr) : ArrayRef<mlir::Value>());
return mlir::success();
}
// 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.
if (dimension == valueShape.size()) {
rewriter.create<AffineStoreOp>(
loc, rewriter.create<arith::ConstantOp>(loc, *valueIt++), alloc,
- llvm::makeArrayRef(indices));
+ llvm::ArrayRef(indices));
return;
}
using llvm::cast;
using llvm::dyn_cast;
using llvm::isa;
-using llvm::makeArrayRef;
using llvm::ScopedHashTableScope;
using llvm::SmallVector;
using llvm::StringRef;
}
// Otherwise, this return operation has zero operands.
- builder.create<ReturnOp>(location, expr ? makeArrayRef(expr)
- : ArrayRef<mlir::Value>());
+ builder.create<ReturnOp>(location,
+ expr ? ArrayRef(expr) : ArrayRef<mlir::Value>());
return mlir::success();
}
// 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
// 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`
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);
}]>
];
// 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)";
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;
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;
Type getType() const {
if (hasRank)
- return RankedTensorType::get(llvm::makeArrayRef(sizes), dtype);
+ return RankedTensorType::get(llvm::ArrayRef(sizes), dtype);
return UnrankedTensorType::get(dtype);
}
/// known to be of the correct type.
template <typename T>
ArrayRef<T> getDataAs() const {
- return llvm::makeArrayRef<T>((const T *)data.data(),
- data.size() / sizeof(T));
+ return llvm::ArrayRef<T>((const T *)data.data(), data.size() / sizeof(T));
}
/// Return a mutable reference to the raw underlying data of this blob.
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.
is_valid_cpp_fp_type<T>::value ||
detail::is_complex_t<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
/// simply wraps the DenseElementsAttr::get calls.
template <typename Arg>
static DenseFPElementsAttr get(const ShapedType &type, Arg &&arg) {
- return DenseElementsAttr::get(type, llvm::makeArrayRef(arg))
+ return DenseElementsAttr::get(type, llvm::ArrayRef(arg))
.template cast<DenseFPElementsAttr>();
}
template <typename T>
/// simply wraps the DenseElementsAttr::get calls.
template <typename Arg>
static DenseIntElementsAttr get(const ShapedType &type, Arg &&arg) {
- return DenseElementsAttr::get(type, llvm::makeArrayRef(arg))
+ return DenseElementsAttr::get(type, llvm::ArrayRef(arg))
.template cast<DenseIntElementsAttr>();
}
template <typename T>
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>;
let constBuilderCall = "::mlir::DenseIntElementsAttr::get("
"::mlir::RankedTensorType::get({" # !interleave(dims, ", ") #
- "}, $_builder.getIntegerType(" # width # ")), ::llvm::makeArrayRef($0))";
+ "}, $_builder.getIntegerType(" # width # ")), ::llvm::ArrayRef($0))";
}
class RankedI32ElementsAttr<list<int> dims> :
// 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";
}
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";
}
return op->emitOpError()
<< "expects parent op "
<< (sizeof...(ParentOpTypes) != 1 ? "to be one of '" : "'")
- << llvm::makeArrayRef({ParentOpTypes::getOperationName()...})
- << "'";
+ << llvm::ArrayRef({ParentOpTypes::getOperationName()...}) << "'";
}
};
};
"alignment.");
ArrayRef<void *> kindAttachments =
- makeArrayRef(identifiers)
- .slice(getVarKindOffset(kind), getNumVarKind(kind));
+ ArrayRef(identifiers).slice(getVarKindOffset(kind), getNumVarKind(kind));
ArrayRef<void *> otherKindAttachments =
- makeArrayRef(other.identifiers)
+ ArrayRef(other.identifiers)
.slice(other.getVarKindOffset(kind), other.getNumVarKind(kind));
return kindAttachments == otherKindAttachments;
}
// Access State
auto AsmParserState::getBlockDefs() const -> iterator_range<BlockDefIterator> {
- return llvm::make_pointee_range(llvm::makeArrayRef(impl->blocks));
+ return llvm::make_pointee_range(llvm::ArrayRef(impl->blocks));
}
auto AsmParserState::getBlockDef(Block *block) const
}
auto AsmParserState::getOpDefs() const -> iterator_range<OperationDefIterator> {
- return llvm::make_pointee_range(llvm::makeArrayRef(impl->operations));
+ return llvm::make_pointee_range(llvm::ArrayRef(impl->operations));
}
auto AsmParserState::getOpDef(Operation *op) const
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<std::complex<APInt> *>(intValues.data()),
intValues.size() / 2);
return DenseElementsAttr::get(type, complexData);
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<std::complex<APFloat> *>(floatValues.data()),
floatValues.size() / 2);
return DenseElementsAttr::get(type, complexData);
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));
if (failed(reader.parseVarInt(dataSize)) ||
failed(reader.parseBytes(dataSize, data)))
return failure();
- result = llvm::makeArrayRef(reinterpret_cast<const char *>(data.data()),
- data.size());
+ result = llvm::ArrayRef(reinterpret_cast<const char *>(data.data()),
+ data.size());
return success();
}
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));
}
MlirAffineMap mlirAffineMapPermutationGet(MlirContext ctx, intptr_t size,
unsigned *permutation) {
return wrap(AffineMap::getPermutationMap(
- llvm::makeArrayRef(permutation, static_cast<size_t>(size)), unwrap(ctx)));
+ llvm::ArrayRef(permutation, static_cast<size_t>(size)), unwrap(ctx)));
}
bool mlirAffineMapIsIdentity(MlirAffineMap affineMap) {
uint64_t *idxs) {
return wrap(unwrap(attr)
.cast<ElementsAttr>()
- .getValues<Attribute>()[llvm::makeArrayRef(idxs, rank)]);
+ .getValues<Attribute>()[llvm::ArrayRef(idxs, rank)]);
}
bool mlirElementsAttrIsValidIndex(MlirAttribute attr, intptr_t rank,
uint64_t *idxs) {
return unwrap(attr).cast<ElementsAttr>().isValidIndex(
- llvm::makeArrayRef(idxs, rank));
+ llvm::ArrayRef(idxs, rank));
}
int64_t mlirElementsAttrGetNumElements(MlirAttribute attr) {
static MlirAttribute getDenseAttribute(MlirType shapedType,
intptr_t numElements,
const T *elements) {
- return wrap(
- DenseElementsAttr::get(unwrap(shapedType).cast<ShapedType>(),
- llvm::makeArrayRef(elements, numElements)));
+ return wrap(DenseElementsAttr::get(unwrap(shapedType).cast<ShapedType>(),
+ llvm::ArrayRef(elements, numElements)));
}
MlirAttribute mlirDenseElementsAttrUInt8Get(MlirType shapedType,
intptr_t numElements, const T *elements) {
return wrap(U::get(unwrap(shapedType).cast<ShapedType>(), unwrap(name),
UnmanagedAsmResourceBlob::allocateInferAlign(
- llvm::makeArrayRef(elements, numElements))));
+ llvm::ArrayRef(elements, numElements))));
}
MLIR_CAPI_EXPORTED MlirAttribute mlirUnmanagedDenseBoolResourceElementsAttrGet(
MlirType mlirVectorTypeGet(intptr_t rank, const int64_t *shape,
MlirType elementType) {
- return wrap(
- VectorType::get(llvm::makeArrayRef(shape, static_cast<size_t>(rank)),
- unwrap(elementType)));
+ return wrap(VectorType::get(llvm::ArrayRef(shape, static_cast<size_t>(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<size_t>(rank)),
+ unwrap(loc), llvm::ArrayRef(shape, static_cast<size_t>(rank)),
unwrap(elementType)));
}
MlirType mlirRankedTensorTypeGet(intptr_t rank, const int64_t *shape,
MlirType elementType, MlirAttribute encoding) {
- return wrap(RankedTensorType::get(
- llvm::makeArrayRef(shape, static_cast<size_t>(rank)), unwrap(elementType),
- unwrap(encoding)));
+ return wrap(
+ RankedTensorType::get(llvm::ArrayRef(shape, static_cast<size_t>(rank)),
+ unwrap(elementType), unwrap(encoding)));
}
MlirType mlirRankedTensorTypeGetChecked(MlirLocation loc, intptr_t rank,
MlirType elementType,
MlirAttribute encoding) {
return wrap(RankedTensorType::getChecked(
- unwrap(loc), llvm::makeArrayRef(shape, static_cast<size_t>(rank)),
+ unwrap(loc), llvm::ArrayRef(shape, static_cast<size_t>(rank)),
unwrap(elementType), unwrap(encoding)));
}
const int64_t *shape, MlirAttribute layout,
MlirAttribute memorySpace) {
return wrap(MemRefType::get(
- llvm::makeArrayRef(shape, static_cast<size_t>(rank)), unwrap(elementType),
+ llvm::ArrayRef(shape, static_cast<size_t>(rank)), unwrap(elementType),
mlirAttributeIsNull(layout)
? MemRefLayoutAttrInterface()
: unwrap(layout).cast<MemRefLayoutAttrInterface>(),
MlirAttribute layout,
MlirAttribute memorySpace) {
return wrap(MemRefType::getChecked(
- unwrap(loc), llvm::makeArrayRef(shape, static_cast<size_t>(rank)),
+ unwrap(loc), llvm::ArrayRef(shape, static_cast<size_t>(rank)),
unwrap(elementType),
mlirAttributeIsNull(layout)
? MemRefLayoutAttrInterface()
MlirType mlirMemRefTypeContiguousGet(MlirType elementType, intptr_t rank,
const int64_t *shape,
MlirAttribute memorySpace) {
- return wrap(MemRefType::get(
- llvm::makeArrayRef(shape, static_cast<size_t>(rank)), unwrap(elementType),
- MemRefLayoutAttrInterface(), unwrap(memorySpace)));
+ return wrap(MemRefType::get(llvm::ArrayRef(shape, static_cast<size_t>(rank)),
+ unwrap(elementType), MemRefLayoutAttrInterface(),
+ unwrap(memorySpace)));
}
MlirType mlirMemRefTypeContiguousGetChecked(MlirLocation loc,
const int64_t *shape,
MlirAttribute memorySpace) {
return wrap(MemRefType::getChecked(
- unwrap(loc), llvm::makeArrayRef(shape, static_cast<size_t>(rank)),
+ unwrap(loc), llvm::ArrayRef(shape, static_cast<size_t>(rank)),
unwrap(elementType), MemRefLayoutAttrInterface(), unwrap(memorySpace)));
}
return wrap(IntegerSet::get(
static_cast<unsigned>(numDims), static_cast<unsigned>(numSymbols),
mlirConstraints,
- llvm::makeArrayRef(eqFlags, static_cast<size_t>(numConstraints))));
+ llvm::ArrayRef(eqFlags, static_cast<size_t>(numConstraints))));
}
MlirIntegerSet
auto integerSet = op.getIntegerSet();
Value zeroConstant = rewriter.create<arith::ConstantIndexOp>(loc, 0);
SmallVector<Value, 8> operands(op.getOperands());
- auto operandsRef = llvm::makeArrayRef(operands);
+ auto operandsRef = llvm::ArrayRef(operands);
// Calculate cond as a conjunction without short-circuiting.
Value cond = nullptr;
LogicalResult matchAndRewrite(AffineDmaStartOp op,
PatternRewriter &rewriter) const override {
SmallVector<Value, 8> operands(op.getOperands());
- auto operandsRef = llvm::makeArrayRef(operands);
+ auto operandsRef = llvm::ArrayRef(operands);
// Expand affine map for DMA source memref.
auto maybeExpandedSrcMap = expandAffineMap(
adaptor.getRhs());
Value sumResult = rewriter.create<spirv::CompositeExtractOp>(
- loc, result, llvm::makeArrayRef(0));
+ loc, result, llvm::ArrayRef(0));
Value carryValue = rewriter.create<spirv::CompositeExtractOp>(
- loc, result, llvm::makeArrayRef(1));
+ loc, result, llvm::ArrayRef(1));
// Convert the carry value to boolean.
Value one = spirv::ConstantOp::getOne(dstElemTy, loc, rewriter);
rewriter.create<SPIRVMulOp>(loc, adaptor.getLhs(), adaptor.getRhs());
Value low = rewriter.create<spirv::CompositeExtractOp>(loc, result,
- llvm::makeArrayRef(0));
- Value high = rewriter.create<spirv::CompositeExtractOp>(
- loc, result, llvm::makeArrayRef(1));
+ llvm::ArrayRef(0));
+ Value high = rewriter.create<spirv::CompositeExtractOp>(loc, result,
+ llvm::ArrayRef(1));
rewriter.replaceOp(op, {low, high});
return success();
auto dataAttrType = RankedTensorType::get(
{static_cast<int64_t>(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);
// Copy size values to stack-allocated memory.
auto one = createIndexAttrConstant(builder, loc, indexType, 1);
auto sizes = builder.create<LLVM::ExtractValueOp>(
- loc, value, llvm::makeArrayRef<int64_t>({kSizePosInMemRefDescriptor}));
+ loc, value, llvm::ArrayRef<int64_t>({kSizePosInMemRefDescriptor}));
auto sizesPtr =
builder.create<LLVM::AllocaOp>(loc, arrayPtrTy, one, /*alignment=*/0);
builder.create<LLVM::StoreOp>(loc, sizes, sizesPtr);
for (auto &en : llvm::enumerate(reassociation)) {
rewriter.setInsertionPoint(op);
auto dstIndex = en.index();
- ArrayRef<int64_t> ref = llvm::makeArrayRef(en.value());
+ ArrayRef<int64_t> 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) {
// 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) \
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<OpAsmParser::UnresolvedOperand> dims(dimsRef.begin(),
dimsRef.end());
parallelReductions, [](const LoopReduction &red) { return red.kind; }));
AffineParallelOp newPloop = outsideBuilder.create<AffineParallelOp>(
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();
FuncOp FuncOp::create(Location location, StringRef name, FunctionType type,
Operation::dialect_attr_range attrs) {
SmallVector<NamedAttribute, 8> 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<NamedAttribute> attrs,
return SmallVector<Value, 1>{
accumFactory(value, shuffleOp.getResult(0))};
},
- [&] { return llvm::makeArrayRef(value); });
+ [&] { return llvm::ArrayRef(value); });
value = rewriter.getInsertionBlock()->getArgument(0);
}
return SmallVector<Value, 1>{value};
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<memref::LoadOp>(loc, from, activeIvs);
b.create<memref::StoreOp>(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<scf::ForOp>(v.getParentRegion()->getParentOp());
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
if (payloadOpName.has_value()) {
addBodyWithPayloadOp(parser, result, payloadOpName.value(), payloadOpAttrs,
- makeArrayRef(result.operands).drop_back());
+ ArrayRef(result.operands).drop_back());
} else {
SmallVector<OpAsmParser::Argument> regionArgs;
if (parser.parseArgumentList(regionArgs, OpAsmParser::Delimiter::Paren,
if (payloadOpName.has_value()) {
addBodyWithPayloadOp(parser, result, payloadOpName.value(), payloadOpAttrs,
- makeArrayRef(result.operands), /*initFirst=*/true);
+ ArrayRef(result.operands), /*initFirst=*/true);
} else {
SmallVector<OpAsmParser::Argument> regionArgs;
if (parser.parseArgumentList(regionArgs, OpAsmParser::Delimiter::Paren,
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<linalg::YieldOp>(loc, args.front());
// 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
SmallVector<int64_t> resultStrides;
resultStrides.reserve(reassociation.size());
for (const ReassociationIndices &reassoc : reassociation) {
- ArrayRef<int64_t> ref = llvm::makeArrayRef(reassoc);
+ ArrayRef<int64_t> 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) {
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();
}
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();
loc, integerType, builder.getI32IntegerAttr(offset));
auto addrOp = builder.create<spirv::AddressOfOp>(loc, varOp);
auto acOp = builder.create<spirv::AccessChainOp>(
- loc, addrOp, llvm::makeArrayRef({zeroOp, offsetOp}));
+ loc, addrOp, llvm::ArrayRef({zeroOp, offsetOp}));
return builder.create<spirv::LoadOp>(loc, acOp);
}
FuncOp FuncOp::create(Location location, StringRef name, FunctionType type,
Operation::dialect_attr_range attrs) {
SmallVector<NamedAttribute, 8> 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<NamedAttribute> attrs,
return failure();
auto shapeVec = llvm::to_vector<6>(
operands[0].cast<DenseIntElementsAttr>().getValues<int64_t>());
- auto shape = llvm::makeArrayRef(shapeVec);
+ auto shape = llvm::ArrayRef(shapeVec);
auto splitPoint = operands[1].cast<IntegerAttr>().getInt();
// Verify that the split point is in the correct range.
// TODO: Constant fold to an "error".
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(),
cstZero));
}
Value ifCond = eqZeroCmpVals.front();
- for (Value cmp : llvm::makeArrayRef(eqZeroCmpVals).drop_front())
+ for (Value cmp : llvm::ArrayRef(eqZeroCmpVals).drop_front())
ifCond = rewriter.create<arith::AndIOp>(loc, ifCond, cmp);
// Build the scf.if op itself. For the "then" branch, we can elide the
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(
/// 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.
auto permutation = extractVector<unsigned>(nextTransposeOp.getTransp());
AffineMap m = inversePermutation(
AffineMap::getPermutationMap(permutation, extractOp.getContext()));
- extractPosition = applyPermutationMap(m, makeArrayRef(extractPosition));
+ extractPosition = applyPermutationMap(m, ArrayRef(extractPosition));
return success();
}
ExtractFromInsertTransposeChainState::handleInsertOpWithMatchingPos(
Value &res) {
auto insertedPos = extractVector<int64_t>(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();
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();
}
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);
if (nonNullSpecs.empty())
return {};
return nonNullSpecs.back().combineWith(
- llvm::makeArrayRef(nonNullSpecs).drop_back());
+ llvm::ArrayRef(nonNullSpecs).drop_back());
}
LogicalResult mlir::detail::verifyDataLayoutOp(Operation *op) {
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);
}
ArrayRef<Type> returnTypes;
if (!isVoidType(returnType)) {
- returnTypes = llvm::makeArrayRef(returnType);
+ returnTypes = llvm::ArrayRef(returnType);
}
typeMap[operands[0]] = FunctionType::get(context, argTypes, returnTypes);
return success();
return {};
}
- auto binary = llvm::makeArrayRef(reinterpret_cast<const uint32_t *>(start),
- size / sizeof(uint32_t));
+ auto binary = llvm::ArrayRef(reinterpret_cast<const uint32_t *>(start),
+ size / sizeof(uint32_t));
return spirv::deserialize(binary, context);
}
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() ? " `" : " |");
}
std::pair<ArrayRef<Type>, ArrayRef<StringRef>> key) {
SmallVector<StringRef> names = llvm::to_vector(llvm::map_range(
key.second, [&](StringRef name) { return alloc.copyInto(name); }));
- return new (alloc.allocate<TupleTypeStorage>()) TupleTypeStorage(
- std::make_pair(alloc.copyInto(key.first),
- alloc.copyInto(llvm::makeArrayRef(names))));
+ return new (alloc.allocate<TupleTypeStorage>())
+ TupleTypeStorage(std::make_pair(alloc.copyInto(key.first),
+ alloc.copyInto(llvm::ArrayRef(names))));
}
};
mlir::applyPartialConversion(Operation *op, ConversionTarget &target,
const FrozenRewritePatternSet &patterns,
DenseSet<Operation *> *unconvertedOps) {
- return applyPartialConversion(llvm::makeArrayRef(op), target, patterns,
+ return applyPartialConversion(llvm::ArrayRef(op), target, patterns,
unconvertedOps);
}
LogicalResult
mlir::applyFullConversion(Operation *op, ConversionTarget &target,
const FrozenRewritePatternSet &patterns) {
- return applyFullConversion(llvm::makeArrayRef(op), target, patterns);
+ return applyFullConversion(llvm::ArrayRef(op), target, patterns);
}
//===----------------------------------------------------------------------===//
const FrozenRewritePatternSet &patterns,
DenseSet<Operation *> &convertedOps,
function_ref<void(Diagnostic &)> notifyCallback) {
- return applyAnalysisConversion(llvm::makeArrayRef(op), target, patterns,
+ return applyAnalysisConversion(llvm::ArrayRef(op), target, patterns,
convertedOps, notifyCallback);
}
// test.pretty_printed_region start <inner-op> end : <functional-type>
// 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<OperationName> parseOpNameInfo = parser.parseCustomOperationName();
if (failed(parseOpNameInfo))
// 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);
}
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.
// 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);
// 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);
os << ") {\n";
} else if (auto *param = dyn_cast<ParameterElement>(first)) {
genVariableParser(param, ctx, os);
- guardOn(llvm::makeArrayRef(param));
+ guardOn(llvm::ArrayRef(param));
} else if (auto *params = dyn_cast<ParamsDirective>(first)) {
genParamsParser(params, ctx, os);
guardOn(params->getParams());
MethodBody &os) {
FormatElement *anchor = el->getAnchor();
if (auto *param = dyn_cast<ParameterElement>(anchor)) {
- guardOnAny(ctx, os, llvm::makeArrayRef(param), el->isInverted());
+ guardOnAny(ctx, os, llvm::ArrayRef(param), el->isInverted());
} else if (auto *params = dyn_cast<ParamsDirective>(anchor)) {
guardOnAny(ctx, os, params->getParams(), el->isInverted());
} else if (auto *strct = dyn_cast<StructDirective>(anchor)) {
/// Return the `then` elements of the optional group. Drops the first
/// `thenParseStart` whitespace elements if `parseable` is true.
ArrayRef<FormatElement *> 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<FormatElement *> getElseElements(bool parseable = false) const {
- return llvm::makeArrayRef(elseElements)
+ return llvm::ArrayRef(elseElements)
.drop_front(parseable ? elseParseStart : 0);
}
[&](StringRef attrName) {
body << "::llvm::StringRef(\"" << attrName << "\")";
});
- body << "};\n return ::llvm::makeArrayRef(attrNames);";
+ body << "};\n return ::llvm::ArrayRef(attrNames);";
}
// Emit the getAttributeNameForIndex methods.
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);
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<EltTy>())
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<Attribute>()[0] == value);
}
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);
});
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);
});
template <typename AttrT, typename T>
static void checkNativeIntAccess(Builder &builder, size_t intWidth) {
T data[] = {0, 1, 2};
- checkNativeAccess<AttrT, T>(builder.getContext(), llvm::makeArrayRef(data),
+ checkNativeAccess<AttrT, T>(builder.getContext(), llvm::ArrayRef(data),
builder.getIntegerType(intWidth));
}
// Bool
bool boolData[] = {true, false, true};
checkNativeAccess<DenseBoolResourceElementsAttr>(
- &context, llvm::makeArrayRef(boolData), builder.getI1Type());
+ &context, llvm::ArrayRef(boolData), builder.getI1Type());
// Unsigned integers
checkNativeIntAccess<DenseUI8ResourceElementsAttr, uint8_t>(builder, 8);
// Float
float floatData[] = {0, 1, 2};
checkNativeAccess<DenseF32ResourceElementsAttr>(
- &context, llvm::makeArrayRef(floatData), builder.getF32Type());
+ &context, llvm::ArrayRef(floatData), builder.getF32Type());
// Double
double doubleData[] = {0, 1, 2};
checkNativeAccess<DenseF64ResourceElementsAttr>(
- &context, llvm::makeArrayRef(doubleData), builder.getF64Type());
+ &context, llvm::ArrayRef(doubleData), builder.getF64Type());
}
TEST(DenseResourceElementsAttrTest, CheckNoCast) {
SmallVector<Attribute> subAttrs;
dictAttr.walkSubAttrs([&](Attribute attr) { subAttrs.push_back(attr); });
- EXPECT_EQ(llvm::makeArrayRef(subAttrs),
+ EXPECT_EQ(llvm::ArrayRef(subAttrs),
ArrayRef<Attribute>({strAttr, trueAttr, falseAttr, boolArrayAttr}));
}