From b166aa833e44a5af6d6f39c34b79fe21b443e424 Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Fri, 20 May 2022 16:24:37 +0800 Subject: [PATCH] [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 --- clang/include/clang/Support/RISCVVIntrinsicUtils.h | 6 +++--- clang/lib/Support/RISCVVIntrinsicUtils.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/include/clang/Support/RISCVVIntrinsicUtils.h b/clang/include/clang/Support/RISCVVIntrinsicUtils.h index 2de7f855559f0..0a7186d42c856 100644 --- a/clang/include/clang/Support/RISCVVIntrinsicUtils.h +++ b/clang/include/clang/Support/RISCVVIntrinsicUtils.h @@ -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 &PrototypeDescriptors); + static std::string + getSuffixStr(BasicType Type, int Log2LMUL, + llvm::ArrayRef PrototypeDescriptors); }; } // end namespace RISCV diff --git a/clang/lib/Support/RISCVVIntrinsicUtils.cpp b/clang/lib/Support/RISCVVIntrinsicUtils.cpp index 43189f6cf9f50..92d29043f2cc0 100644 --- a/clang/lib/Support/RISCVVIntrinsicUtils.cpp +++ b/clang/lib/Support/RISCVVIntrinsicUtils.cpp @@ -922,7 +922,7 @@ std::string RVVIntrinsic::getBuiltinTypeStr() const { std::string RVVIntrinsic::getSuffixStr( BasicType Type, int Log2LMUL, - const llvm::SmallVector &PrototypeDescriptors) { + llvm::ArrayRef PrototypeDescriptors) { SmallVector SuffixStrs; for (auto PD : PrototypeDescriptors) { auto T = RVVType::computeType(Type, Log2LMUL, PD);