================ @@ -8031,6 +8034,28 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, CallingConv CCOld = fn->getCallConv(); Attr *CCAttr = getCCTypeAttr(S.Context, attr); + if (attr.getKind() == ParsedAttr::AT_RISCVVLSCC) { + // If the riscv_abi_vlen doesn't have any argument, we set set it to 2 to + // differentiate from functions without attribute. + unsigned ABIVLen = 2; + if (attr.getNumArgs() && + !S.checkUInt32Argument(attr, attr.getArgAsExpr(0), ABIVLen)) + return false; + if (ABIVLen != 2 && (ABIVLen < 32 || ABIVLen > 65536)) { ---------------- topperc wrote:
Does this allow users to write 2? https://github.com/llvm/llvm-project/pull/100346 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits