diff --git a/bolt/lib/Profile/DataAggregator.cpp b/bolt/lib/Profile/DataAggregator.cpp --- a/bolt/lib/Profile/DataAggregator.cpp +++ b/bolt/lib/Profile/DataAggregator.cpp @@ -336,7 +336,7 @@ auto Close = make_scope_exit([&] { sys::fs::closeFile(*FD); }); Expected BytesRead = sys::fs::readNativeFileSlice( - *FD, makeMutableArrayRef(Buf, sizeof(Buf)), 0); + *FD, MutableArrayRef(Buf, sizeof(Buf)), 0); if (!BytesRead) { consumeError(BytesRead.takeError()); return false; diff --git a/clang-tools-extra/clangd/FuzzyMatch.cpp b/clang-tools-extra/clangd/FuzzyMatch.cpp --- a/clang-tools-extra/clangd/FuzzyMatch.cpp +++ b/clang-tools-extra/clangd/FuzzyMatch.cpp @@ -86,7 +86,7 @@ for (Action A : {Miss, Match}) Scores[P][W][A] = {AwfulScore, Miss}; PatTypeSet = calculateRoles(llvm::StringRef(Pat, PatN), - llvm::makeMutableArrayRef(PatRole, PatN)); + llvm::MutableArrayRef(PatRole, PatN)); } std::optional FuzzyMatcher::match(llvm::StringRef Word) { @@ -200,7 +200,7 @@ // e.g. vsprintf is V S Print F, and should match [pri] but not [int]. // We could add a tokenization dictionary for common stdlib names. WordTypeSet = calculateRoles(llvm::StringRef(Word, WordN), - llvm::makeMutableArrayRef(WordRole, WordN)); + llvm::MutableArrayRef(WordRole, WordN)); return true; } diff --git a/clang-tools-extra/clangd/SemanticSelection.cpp b/clang-tools-extra/clangd/SemanticSelection.cpp --- a/clang-tools-extra/clangd/SemanticSelection.cpp +++ b/clang-tools-extra/clangd/SemanticSelection.cpp @@ -154,7 +154,7 @@ Head.range = std::move(Ranges.front()); SelectionRange *Tail = &Head; for (auto &Range : - llvm::makeMutableArrayRef(Ranges.data(), Ranges.size()).drop_front()) { + llvm::MutableArrayRef(Ranges.data(), Ranges.size()).drop_front()) { Tail->parent = std::make_unique(); Tail = Tail->parent.get(); Tail->range = std::move(Range); diff --git a/clang-tools-extra/clangd/index/dex/Trigram.cpp b/clang-tools-extra/clangd/index/dex/Trigram.cpp --- a/clang-tools-extra/clangd/index/dex/Trigram.cpp +++ b/clang-tools-extra/clangd/index/dex/Trigram.cpp @@ -32,7 +32,7 @@ // Apply fuzzy matching text segmentation. llvm::SmallVector Roles(Identifier.size()); calculateRoles(Identifier, - llvm::makeMutableArrayRef(Roles.data(), Identifier.size())); + llvm::MutableArrayRef(Roles.data(), Identifier.size())); std::string LowercaseIdentifier = Identifier.lower(); @@ -126,7 +126,7 @@ // Apply fuzzy matching text segmentation. llvm::SmallVector Roles(Query.size()); - calculateRoles(Query, llvm::makeMutableArrayRef(Roles.data(), Query.size())); + calculateRoles(Query, llvm::MutableArrayRef(Roles.data(), Query.size())); std::string LowercaseQuery = Query.lower(); diff --git a/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h b/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h --- a/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h +++ b/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h @@ -142,8 +142,8 @@ return llvm::ArrayRef(reinterpret_cast(this + 1), Num); } llvm::MutableArrayRef children(uint16_t Num) { - return llvm::makeMutableArrayRef(reinterpret_cast(this + 1), - Num); + return llvm::MutableArrayRef(reinterpret_cast(this + 1), + Num); } Token::Index StartIndex; diff --git a/clang/include/clang/AST/DeclOpenMP.h b/clang/include/clang/AST/DeclOpenMP.h --- a/clang/include/clang/AST/DeclOpenMP.h +++ b/clang/include/clang/AST/DeclOpenMP.h @@ -123,7 +123,7 @@ MutableArrayRef getVars() { auto **Storage = reinterpret_cast(Data->getChildren().data()); - return llvm::makeMutableArrayRef(Storage, Data->getNumChildren()); + return llvm::MutableArrayRef(Storage, Data->getNumChildren()); } void setVars(ArrayRef VL); @@ -486,7 +486,7 @@ MutableArrayRef getVars() { auto **Storage = reinterpret_cast(Data->getChildren().data()); - return llvm::makeMutableArrayRef(Storage, Data->getNumChildren()); + return llvm::MutableArrayRef(Storage, Data->getNumChildren()); } void setVars(ArrayRef VL); diff --git a/clang/include/clang/AST/OpenMPClause.h b/clang/include/clang/AST/OpenMPClause.h --- a/clang/include/clang/AST/OpenMPClause.h +++ b/clang/include/clang/AST/OpenMPClause.h @@ -5425,7 +5425,7 @@ MutableArrayRef getUDMapperRefs() { assert(SupportsMapper && "Must be a clause that is possible to have user-defined mappers"); - return llvm::makeMutableArrayRef( + return llvm::MutableArrayRef( static_cast(this)->template getTrailingObjects() + OMPVarListClause::varlist_size(), OMPVarListClause::varlist_size()); @@ -8920,7 +8920,7 @@ /// Get the clauses storage. MutableArrayRef getClauses() { - return llvm::makeMutableArrayRef(getTrailingObjects(), + return llvm::MutableArrayRef(getTrailingObjects(), NumClauses); } ArrayRef getClauses() const { diff --git a/clang/include/clang/AST/StmtOpenMP.h b/clang/include/clang/AST/StmtOpenMP.h --- a/clang/include/clang/AST/StmtOpenMP.h +++ b/clang/include/clang/AST/StmtOpenMP.h @@ -1067,7 +1067,7 @@ MutableArrayRef getCounters() { auto **Storage = reinterpret_cast( &Data->getChildren()[getArraysOffset(getDirectiveKind())]); - return llvm::makeMutableArrayRef(Storage, getLoopsNumber()); + return llvm::MutableArrayRef(Storage, getLoopsNumber()); } /// Get the private counters storage. @@ -1075,7 +1075,7 @@ auto **Storage = reinterpret_cast( &Data->getChildren()[getArraysOffset(getDirectiveKind()) + getLoopsNumber()]); - return llvm::makeMutableArrayRef(Storage, getLoopsNumber()); + return llvm::MutableArrayRef(Storage, getLoopsNumber()); } /// Get the updates storage. @@ -1083,7 +1083,7 @@ auto **Storage = reinterpret_cast( &Data->getChildren()[getArraysOffset(getDirectiveKind()) + 2 * getLoopsNumber()]); - return llvm::makeMutableArrayRef(Storage, getLoopsNumber()); + return llvm::MutableArrayRef(Storage, getLoopsNumber()); } /// Get the updates storage. @@ -1091,7 +1091,7 @@ auto **Storage = reinterpret_cast( &Data->getChildren()[getArraysOffset(getDirectiveKind()) + 3 * getLoopsNumber()]); - return llvm::makeMutableArrayRef(Storage, getLoopsNumber()); + return llvm::MutableArrayRef(Storage, getLoopsNumber()); } /// Get the final counter updates storage. @@ -1099,7 +1099,7 @@ auto **Storage = reinterpret_cast( &Data->getChildren()[getArraysOffset(getDirectiveKind()) + 4 * getLoopsNumber()]); - return llvm::makeMutableArrayRef(Storage, getLoopsNumber()); + return llvm::MutableArrayRef(Storage, getLoopsNumber()); } /// Get the dependent counters storage. @@ -1107,7 +1107,7 @@ auto **Storage = reinterpret_cast( &Data->getChildren()[getArraysOffset(getDirectiveKind()) + 5 * getLoopsNumber()]); - return llvm::makeMutableArrayRef(Storage, getLoopsNumber()); + return llvm::MutableArrayRef(Storage, getLoopsNumber()); } /// Get the dependent inits storage. @@ -1115,7 +1115,7 @@ auto **Storage = reinterpret_cast( &Data->getChildren()[getArraysOffset(getDirectiveKind()) + 6 * getLoopsNumber()]); - return llvm::makeMutableArrayRef(Storage, getLoopsNumber()); + return llvm::MutableArrayRef(Storage, getLoopsNumber()); } /// Get the finals conditions storage. @@ -1123,7 +1123,7 @@ auto **Storage = reinterpret_cast( &Data->getChildren()[getArraysOffset(getDirectiveKind()) + 7 * getLoopsNumber()]); - return llvm::makeMutableArrayRef(Storage, getLoopsNumber()); + return llvm::MutableArrayRef(Storage, getLoopsNumber()); } protected: diff --git a/clang/include/clang/Lex/MacroInfo.h b/clang/include/clang/Lex/MacroInfo.h --- a/clang/include/clang/Lex/MacroInfo.h +++ b/clang/include/clang/Lex/MacroInfo.h @@ -257,7 +257,7 @@ NumReplacementTokens = NumTokens; Token *NewReplacementTokens = PPAllocator.Allocate(NumTokens); ReplacementTokens = NewReplacementTokens; - return llvm::makeMutableArrayRef(NewReplacementTokens, NumTokens); + return llvm::MutableArrayRef(NewReplacementTokens, NumTokens); } void setTokens(ArrayRef Tokens, llvm::BumpPtrAllocator &PPAllocator) { diff --git a/clang/lib/AST/StmtOpenMP.cpp b/clang/lib/AST/StmtOpenMP.cpp --- a/clang/lib/AST/StmtOpenMP.cpp +++ b/clang/lib/AST/StmtOpenMP.cpp @@ -31,7 +31,7 @@ } MutableArrayRef OMPChildren::getChildren() { - return llvm::makeMutableArrayRef(getTrailingObjects(), NumChildren); + return llvm::MutableArrayRef(getTrailingObjects(), NumChildren); } OMPChildren *OMPChildren::Create(void *Mem, ArrayRef Clauses) { diff --git a/lld/COFF/Chunks.cpp b/lld/COFF/Chunks.cpp --- a/lld/COFF/Chunks.cpp +++ b/lld/COFF/Chunks.cpp @@ -870,7 +870,7 @@ uint8_t flag; }; auto flags = - makeMutableArrayRef(reinterpret_cast(buf), syms.size()); + MutableArrayRef(reinterpret_cast(buf), syms.size()); for (auto t : zip(syms, flags)) { const auto &sym = std::get<0>(t); auto &flag = std::get<1>(t); diff --git a/lld/COFF/DebugTypes.cpp b/lld/COFF/DebugTypes.cpp --- a/lld/COFF/DebugTypes.cpp +++ b/lld/COFF/DebugTypes.cpp @@ -642,7 +642,7 @@ size_t offset = merged.recs.size(); size_t newSize = alignTo(ty.length(), 4); merged.recs.resize(offset + newSize); - auto newRec = makeMutableArrayRef(&merged.recs[offset], newSize); + auto newRec = MutableArrayRef(&merged.recs[offset], newSize); memcpy(newRec.data(), ty.data().data(), newSize); // Fix up the record prefix and padding bytes if it required resizing. diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp --- a/lld/COFF/Writer.cpp +++ b/lld/COFF/Writer.cpp @@ -498,11 +498,11 @@ ArrayRef curRelocs = sc->getRelocs(); MutableArrayRef newRelocs; if (originalRelocs.data() == curRelocs.data()) { - newRelocs = makeMutableArrayRef( + newRelocs = MutableArrayRef( bAlloc().Allocate(originalRelocs.size()), originalRelocs.size()); } else { - newRelocs = makeMutableArrayRef( + newRelocs = MutableArrayRef( const_cast(curRelocs.data()), curRelocs.size()); } diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h --- a/lld/ELF/InputFiles.h +++ b/lld/ELF/InputFiles.h @@ -181,7 +181,7 @@ numSymbols - firstGlobal); } MutableArrayRef getMutableGlobalSymbols() { - return llvm::makeMutableArrayRef(symbols.get() + firstGlobal, + return llvm::MutableArrayRef(symbols.get() + firstGlobal, numSymbols - firstGlobal); } diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -2818,7 +2818,7 @@ SmallVector ret; ret.reserve(numSymbols); for (SmallVector &vec : - makeMutableArrayRef(symbols.get(), numShards)) + MutableArrayRef(symbols.get(), numShards)) for (GdbSymbol &sym : vec) ret.push_back(std::move(sym)); diff --git a/lldb/source/Host/common/NativeProcessProtocol.cpp b/lldb/source/Host/common/NativeProcessProtocol.cpp --- a/lldb/source/Host/common/NativeProcessProtocol.cpp +++ b/lldb/source/Host/common/NativeProcessProtocol.cpp @@ -650,7 +650,7 @@ return error; auto data = - llvm::makeMutableArrayRef(static_cast(buf), bytes_read); + llvm::MutableArrayRef(static_cast(buf), bytes_read); for (const auto &pair : m_software_breakpoints) { lldb::addr_t bp_addr = pair.first; auto saved_opcodes = llvm::ArrayRef(pair.second.saved_opcodes); diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h +++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h @@ -187,7 +187,7 @@ } MutableArrayRef getMutableRows() { - return makeMutableArrayRef(Rows.get(), Header.NumBuckets); + return MutableArrayRef(Rows.get(), Header.NumBuckets); } }; diff --git a/llvm/include/llvm/IR/DataLayout.h b/llvm/include/llvm/IR/DataLayout.h --- a/llvm/include/llvm/IR/DataLayout.h +++ b/llvm/include/llvm/IR/DataLayout.h @@ -643,7 +643,7 @@ unsigned getElementContainingOffset(uint64_t Offset) const; MutableArrayRef getMemberOffsets() { - return llvm::makeMutableArrayRef(getTrailingObjects(), + return llvm::MutableArrayRef(getTrailingObjects(), NumElements); } diff --git a/llvm/include/llvm/IR/Metadata.h b/llvm/include/llvm/IR/Metadata.h --- a/llvm/include/llvm/IR/Metadata.h +++ b/llvm/include/llvm/IR/Metadata.h @@ -1027,7 +1027,7 @@ MutableArrayRef operands() { if (IsLarge) return getLarge(); - return makeMutableArrayRef( + return MutableArrayRef( reinterpret_cast(this) - SmallSize, SmallNumOps); } diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h --- a/llvm/include/llvm/ProfileData/InstrProf.h +++ b/llvm/include/llvm/ProfileData/InstrProf.h @@ -862,7 +862,7 @@ // cast away the constness from the result. auto AR = const_cast(this)->getValueSitesForKind( ValueKind); - return makeMutableArrayRef( + return MutableArrayRef( const_cast(AR.data()), AR.size()); } ArrayRef diff --git a/llvm/include/llvm/Support/Parallel.h b/llvm/include/llvm/Support/Parallel.h --- a/llvm/include/llvm/Support/Parallel.h +++ b/llvm/include/llvm/Support/Parallel.h @@ -203,7 +203,7 @@ // reductions are cheaper than the transformation. ResultTy FinalResult = std::move(Results.front()); for (ResultTy &PartialResult : - makeMutableArrayRef(Results.data() + 1, Results.size() - 1)) + MutableArrayRef(Results.data() + 1, Results.size() - 1)) FinalResult = Reduce(FinalResult, std::move(PartialResult)); return std::move(FinalResult); } diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -1867,7 +1867,7 @@ APFloat::roundingMode mode = roundTowardZero? APFloat::rmTowardZero : APFloat::rmNearestTiesToEven; APFloat::opStatus status = - Val.convertToInteger(makeMutableArrayRef(UIntVal), ResultWidth, + Val.convertToInteger(MutableArrayRef(UIntVal), ResultWidth, IsSigned, mode, &isExact); if (status != APFloat::opOK && (!roundTowardZero || status != APFloat::opInexact)) diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp @@ -719,7 +719,7 @@ APFloat apf = APFloat(APFloat::x87DoubleExtended(), GV.IntVal); uint64_t v; bool ignored; - (void)apf.convertToInteger(makeMutableArrayRef(v), BitWidth, + (void)apf.convertToInteger(MutableArrayRef(v), BitWidth, CE->getOpcode()==Instruction::FPToSI, APFloat::rmTowardZero, &ignored); GV.IntVal = v; // endian? diff --git a/llvm/lib/Support/Path.cpp b/llvm/lib/Support/Path.cpp --- a/llvm/lib/Support/Path.cpp +++ b/llvm/lib/Support/Path.cpp @@ -1181,7 +1181,7 @@ for (;;) { Buffer.resize_for_overwrite(Size + ChunkSize); Expected ReadBytes = readNativeFile( - FileHandle, makeMutableArrayRef(Buffer.begin() + Size, ChunkSize)); + FileHandle, MutableArrayRef(Buffer.begin() + Size, ChunkSize)); if (!ReadBytes) return ReadBytes.takeError(); if (*ReadBytes == 0) diff --git a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp --- a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp @@ -3081,7 +3081,7 @@ } else { bool IsHighest = 2 * i >= Accum.size(); Register SeparateOddOut[2]; - auto LocalAccum = makeMutableArrayRef(SeparateOddOut) + auto LocalAccum = MutableArrayRef(SeparateOddOut) .take_front(IsHighest ? 1 : 2); OddCarry = buildMadChain(LocalAccum, 2 * i - 1, OddCarryIn); diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -195,7 +195,7 @@ bool isExact = false; // See if we can convert this to an int64_t uint64_t UIntVal; - if (APF.convertToInteger(makeMutableArrayRef(UIntVal), 64, true, + if (APF.convertToInteger(MutableArrayRef(UIntVal), 64, true, APFloat::rmTowardZero, &isExact) != APFloat::opOK || !isExact) return false; diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -8045,7 +8045,7 @@ return TEs.back(); }; (void)performExtractsShuffleAction( - makeMutableArrayRef(Vector.data(), Vector.size()), Base, + MutableArrayRef(Vector.data(), Vector.size()), Base, [](const TreeEntry *E) { return E->getVectorFactor(); }, ResizeToVF, EstimateShufflesCost); InstructionCost InsertCost = TTI->getScalarizationOverhead( @@ -9898,7 +9898,7 @@ Builder.SetInsertPoint(LastInsert); auto Vector = ShuffledInserts[I].ValueMasks.takeVector(); Value *NewInst = performExtractsShuffleAction( - makeMutableArrayRef(Vector.data(), Vector.size()), + MutableArrayRef(Vector.data(), Vector.size()), FirstInsert->getOperand(0), [](Value *Vec) { return cast(Vec->getType()) diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp --- a/llvm/unittests/Support/Path.cpp +++ b/llvm/unittests/Support/Path.cpp @@ -1960,7 +1960,7 @@ return FD.takeError(); auto Close = make_scope_exit([&] { fs::closeFile(*FD); }); if (Expected BytesRead = fs::readNativeFile( - *FD, makeMutableArrayRef(&*Buf.begin(), Buf.size()))) + *FD, MutableArrayRef(&*Buf.begin(), Buf.size()))) return Buf.substr(0, *BytesRead); else return BytesRead.takeError(); @@ -2027,7 +2027,7 @@ size_t ToRead) -> Expected { std::string Buf(ToRead, '?'); if (Expected BytesRead = fs::readNativeFileSlice( - *FD, makeMutableArrayRef(&*Buf.begin(), Buf.size()), Offset)) + *FD, MutableArrayRef(&*Buf.begin(), Buf.size()), Offset)) return Buf.substr(0, *BytesRead); else return BytesRead.takeError(); diff --git a/mlir/lib/Bytecode/Writer/IRNumbering.cpp b/mlir/lib/Bytecode/Writer/IRNumbering.cpp --- a/mlir/lib/Bytecode/Writer/IRNumbering.cpp +++ b/mlir/lib/Bytecode/Writer/IRNumbering.cpp @@ -150,9 +150,9 @@ // bytes it takes to encode a varint index to that sub-section. This allows // for more efficiently encoding components of the same dialect (e.g. we only // have to encode the dialect reference once). - groupByDialectPerByte(llvm::makeMutableArrayRef(orderedAttrs)); - groupByDialectPerByte(llvm::makeMutableArrayRef(orderedOpNames)); - groupByDialectPerByte(llvm::makeMutableArrayRef(orderedTypes)); + groupByDialectPerByte(llvm::MutableArrayRef(orderedAttrs)); + groupByDialectPerByte(llvm::MutableArrayRef(orderedOpNames)); + groupByDialectPerByte(llvm::MutableArrayRef(orderedTypes)); // Finalize the numbering of the dialect resources. finalizeDialectResourceNumberings(op); diff --git a/mlir/lib/Dialect/Affine/Transforms/LoopCoalescing.cpp b/mlir/lib/Dialect/Affine/Transforms/LoopCoalescing.cpp --- a/mlir/lib/Dialect/Affine/Transforms/LoopCoalescing.cpp +++ b/mlir/lib/Dialect/Affine/Transforms/LoopCoalescing.cpp @@ -80,8 +80,7 @@ LLVM_DEBUG(llvm::dbgs() << " found coalesceable band from " << start << " to " << end << '\n'); - auto band = - llvm::makeMutableArrayRef(loops.data() + start, end - start); + auto band = llvm::MutableArrayRef(loops.data() + start, end - start); (void)coalesceLoops(band); break; } diff --git a/mlir/test/mlir-tblgen/constraint-unique.td b/mlir/test/mlir-tblgen/constraint-unique.td --- a/mlir/test/mlir-tblgen/constraint-unique.td +++ b/mlir/test/mlir-tblgen/constraint-unique.td @@ -127,10 +127,10 @@ // CHECK: for (auto [[$RET_VALUE:.*]] : [[$RET_VALUE_GROUP]]) // CHECK-NEXT: if (::mlir::failed([[$A_TYPE_CONSTRAINT]](*this, [[$RET_VALUE]].getType(), "result", index++))) // CHECK-NEXT: return ::mlir::failure(); -// CHECK: for (auto ®ion : ::llvm::makeMutableArrayRef((*this)->getRegion(0))) +// CHECK: for (auto ®ion : ::llvm::MutableArrayRef((*this)->getRegion(0))) // CHECK-NEXT: if (::mlir::failed([[$A_REGION_CONSTRAINT]](*this, region, "d", index++))) // CHECK-NEXT: return ::mlir::failure(); -// CHECK: for (auto *successor : ::llvm::makeMutableArrayRef(c())) +// CHECK: for (auto *successor : ::llvm::MutableArrayRef(c())) // CHECK-NEXT: if (::mlir::failed([[$A_SUCCESSOR_CONSTRAINT]](*this, successor, "c", index++))) // CHECK-NEXT: return ::mlir::failure(); @@ -148,9 +148,9 @@ // CHECK: for (auto [[$RET_VALUE:.*]] : [[$RET_VALUE_GROUP]]) // CHECK-NEXT: if (::mlir::failed([[$O_TYPE_CONSTRAINT]](*this, [[$RET_VALUE]].getType(), "result", index++))) // CHECK-NEXT: return ::mlir::failure(); -// CHECK: for (auto ®ion : ::llvm::makeMutableArrayRef((*this)->getRegion(0))) +// CHECK: for (auto ®ion : ::llvm::MutableArrayRef((*this)->getRegion(0))) // CHECK-NEXT: if (::mlir::failed([[$O_REGION_CONSTRAINT]](*this, region, "d", index++))) // CHECK-NEXT: return ::mlir::failure(); -// CHECK: for (auto *successor : ::llvm::makeMutableArrayRef(c())) +// CHECK: for (auto *successor : ::llvm::MutableArrayRef(c())) // CHECK-NEXT: if (::mlir::failed([[$O_SUCCESSOR_CONSTRAINT]](*this, successor, "c", index++))) // CHECK-NEXT: return ::mlir::failure(); diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp --- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp +++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp @@ -2746,7 +2746,7 @@ /// /// {0}: The region's index. const char *const getSingleRegion = - "::llvm::makeMutableArrayRef((*this)->getRegion({0}))"; + "::llvm::MutableArrayRef((*this)->getRegion({0}))"; // If we have no regions, there is nothing more to do. const auto canSkip = [](const NamedRegion ®ion) { @@ -2781,7 +2781,7 @@ /// Get a single successor. /// /// {0}: The successor's name. - const char *const getSingleSuccessor = "::llvm::makeMutableArrayRef({0}())"; + const char *const getSingleSuccessor = "::llvm::MutableArrayRef({0}())"; // If we have no successors, there is nothing more to do. const auto canSkip = [](const NamedSuccessor &successor) {