Skip to content

Commit

Permalink
[RISCV][NFC] Change interface of RVVIntrinsic::getSuffixStr
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kito-cheng committed May 24, 2022
1 parent a7c079a commit b166aa8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions clang/include/clang/Support/RISCVVIntrinsicUtils.h
Expand Up @@ -340,9 +340,9 @@ class RVVIntrinsic {
// 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
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Support/RISCVVIntrinsicUtils.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit b166aa8

Please sign in to comment.