Now RISC-V the value provided to -march can determine whether to compile for 32- or 64-bit RISC-V irrespective of the target provided to the Clang driver. It was introduced at https://reviews.llvm.org/D54214 before.
So this patch tries to go further based on D54214 that -march can be deduced in more generic way without providing -march but -mcpu or -mabi. To make it more clear.
clang -target=riscv32-- -march=rv64gc, riscv32 will be replaced by riscv64 to avoid report error.
clang -target=riscv32-- -mcpu=sifive-s21, riscv32 will also be replaced by riscv64 because sifive-s21' default march is rv64imac provided at RISCVTargetParser.def.