kito-cheng created this revision. kito-cheng added a reviewer: khchen. Herald added subscribers: sunshaoce, VincentWu, luke957, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, arichardson. Herald added a project: All. kito-cheng requested review of this revision. Herald added subscribers: cfe-commits, pcwang-thead, eopXD, MaskRay. Herald added a project: clang.
This NFC patch is splited from D111617 <https://reviews.llvm.org/D111617>. Using llvm::ArrayRef rather than llvm::SmallVector, ArrayRef is more generic interface that could accept both llvm::ArrayRef and llvm::SmallVector. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D125893 Files: clang/include/clang/Support/RISCVVIntrinsicUtils.h clang/lib/Support/RISCVVIntrinsicUtils.cpp Index: clang/lib/Support/RISCVVIntrinsicUtils.cpp =================================================================== --- clang/lib/Support/RISCVVIntrinsicUtils.cpp +++ clang/lib/Support/RISCVVIntrinsicUtils.cpp @@ -928,7 +928,7 @@ std::string RVVIntrinsic::getSuffixStr( BasicType Type, int Log2LMUL, - const llvm::SmallVector<PrototypeDescriptor> &PrototypeDescriptors) { + const llvm::ArrayRef<PrototypeDescriptor> &PrototypeDescriptors) { SmallVector<std::string> SuffixStrs; for (auto PD : PrototypeDescriptors) { auto T = RVVType::computeType(Type, Log2LMUL, PD); Index: clang/include/clang/Support/RISCVVIntrinsicUtils.h =================================================================== --- clang/include/clang/Support/RISCVVIntrinsicUtils.h +++ clang/include/clang/Support/RISCVVIntrinsicUtils.h @@ -341,9 +341,10 @@ // Return the type string for a BUILTIN() macro in Builtins.def. std::string getBuiltinTypeStr() const; - static std::string getSuffixStr( - BasicType Type, int Log2LMUL, - const llvm::SmallVector<PrototypeDescriptor> &PrototypeDescriptors); + static std::string + getSuffixStr(BasicType Type, int Log2LMUL, + const llvm::ArrayRefSmallVector<PrototypeDescriptor> + &PrototypeDescriptors); }; } // end namespace RISCV
Index: clang/lib/Support/RISCVVIntrinsicUtils.cpp =================================================================== --- clang/lib/Support/RISCVVIntrinsicUtils.cpp +++ clang/lib/Support/RISCVVIntrinsicUtils.cpp @@ -928,7 +928,7 @@ std::string RVVIntrinsic::getSuffixStr( BasicType Type, int Log2LMUL, - const llvm::SmallVector<PrototypeDescriptor> &PrototypeDescriptors) { + const llvm::ArrayRef<PrototypeDescriptor> &PrototypeDescriptors) { SmallVector<std::string> SuffixStrs; for (auto PD : PrototypeDescriptors) { auto T = RVVType::computeType(Type, Log2LMUL, PD); Index: clang/include/clang/Support/RISCVVIntrinsicUtils.h =================================================================== --- clang/include/clang/Support/RISCVVIntrinsicUtils.h +++ clang/include/clang/Support/RISCVVIntrinsicUtils.h @@ -341,9 +341,10 @@ // Return the type string for a BUILTIN() macro in Builtins.def. std::string getBuiltinTypeStr() const; - static std::string getSuffixStr( - BasicType Type, int Log2LMUL, - const llvm::SmallVector<PrototypeDescriptor> &PrototypeDescriptors); + static std::string + getSuffixStr(BasicType Type, int Log2LMUL, + const llvm::ArrayRefSmallVector<PrototypeDescriptor> + &PrototypeDescriptors); }; } // end namespace RISCV
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits