Author: Jianjian Guan Date: 2023-10-11T14:55:52+08:00 New Revision: bccf2c8468e2f364f8c364d613ffb78d61b67ceb
URL: https://github.com/llvm/llvm-project/commit/bccf2c8468e2f364f8c364d613ffb78d61b67ceb DIFF: https://github.com/llvm/llvm-project/commit/bccf2c8468e2f364f8c364d613ffb78d61b67ceb.diff LOG: [clang][RISCV] Fix the condition of checking signature in getIndex (#67403) The current condition causes assert failing if try to add a new vendor vector file which only contains the same type signature. Added: Modified: clang/utils/TableGen/RISCVVEmitter.cpp Removed: ################################################################################ diff --git a/clang/utils/TableGen/RISCVVEmitter.cpp b/clang/utils/TableGen/RISCVVEmitter.cpp index 41025926058ed07..c08e48b3f44dfe3 100644 --- a/clang/utils/TableGen/RISCVVEmitter.cpp +++ b/clang/utils/TableGen/RISCVVEmitter.cpp @@ -290,7 +290,7 @@ unsigned SemaSignatureTable::getIndex(ArrayRef<PrototypeDescriptor> Signature) { return 0; // Checking Signature already in table or not. - if (Signature.size() < SignatureTable.size()) { + if (Signature.size() <= SignatureTable.size()) { size_t Bound = SignatureTable.size() - Signature.size() + 1; for (size_t Index = 0; Index < Bound; ++Index) { if (equal(Signature.begin(), Signature.end(), _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits