Author: Kito Cheng Date: 2022-05-24T17:24:32+08:00 New Revision: b166aa833e44a5af6d6f39c34b79fe21b443e424
URL: https://github.com/llvm/llvm-project/commit/b166aa833e44a5af6d6f39c34b79fe21b443e424 DIFF: https://github.com/llvm/llvm-project/commit/b166aa833e44a5af6d6f39c34b79fe21b443e424.diff LOG: [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 Added: Modified: clang/include/clang/Support/RISCVVIntrinsicUtils.h clang/lib/Support/RISCVVIntrinsicUtils.cpp Removed: ################################################################################ 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<PrototypeDescriptor> &PrototypeDescriptors); + static std::string + getSuffixStr(BasicType Type, int Log2LMUL, + llvm::ArrayRef<PrototypeDescriptor> 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<PrototypeDescriptor> &PrototypeDescriptors) { + llvm::ArrayRef<PrototypeDescriptor> PrototypeDescriptors) { SmallVector<std::string> SuffixStrs; for (auto PD : PrototypeDescriptors) { auto T = RVVType::computeType(Type, Log2LMUL, PD); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits