[llvm] [RISCV] Detect duplicate extensions in parseNormalizedArchString. (PR #91416)
Shao-Ce SUN via llvm-commits
llvm-commits at lists.llvm.org
Tue May 7 19:10:42 PDT 2024
================
@@ -492,7 +492,9 @@ RISCVISAInfo::parseNormalizedArchString(StringRef Arch) {
"'" + Twine(ExtName[0]) +
"' must be followed by a letter");
- ISAInfo->addExtension(ExtName, {MajorVersion, MinorVersion});
+ if (!ISAInfo->addExtension(ExtName, {MajorVersion, MinorVersion}))
+ return createStringError(errc::invalid_argument,
+ "duplicate extension '" + ExtName + "'");
----------------
sunshaoce wrote:
Could we inform the user which version was ultimately chosen?
https://github.com/llvm/llvm-project/pull/91416
More information about the llvm-commits
mailing list