[RISCV][NFC] Change interface of RVVIntrinsic::getSuffixStr

This NFC patch is splited from D111617.

Using llvm::ArrayRef rather than llvm::SmallVector, ArrayRef is more generic
interface that could accept both llvm::ArrayRef and llvm::SmallVector.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D125893
This commit is contained in:
Kito Cheng 2022-05-20 16:24:37 +08:00
parent a7c079aaa2
commit b166aa833e
2 changed files with 4 additions and 4 deletions

View File

@ -340,9 +340,9 @@ public:
// 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,
llvm::ArrayRef<PrototypeDescriptor> PrototypeDescriptors);
};
} // end namespace RISCV

View File

@ -922,7 +922,7 @@ std::string RVVIntrinsic::getBuiltinTypeStr() const {
std::string RVVIntrinsic::getSuffixStr(
BasicType Type, int Log2LMUL,
const llvm::SmallVector<PrototypeDescriptor> &PrototypeDescriptors) {
llvm::ArrayRef<PrototypeDescriptor> PrototypeDescriptors) {
SmallVector<std::string> SuffixStrs;
for (auto PD : PrototypeDescriptors) {
auto T = RVVType::computeType(Type, Log2LMUL, PD);