Skip to content

Commit 371f936

Browse files
committed
[RISCV] Make extension names lower case in RISCVISAInfo::checkDependency() error messages.
1 parent 10a4f1e commit 371f936

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

llvm/lib/TargetParser/RISCVISAInfo.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ Error RISCVISAInfo::checkDependency() {
743743
bool HasZcmt = Exts.count("zcmt") != 0;
744744

745745
if (HasI && HasE)
746-
return getIncompatibleError("I", "E");
746+
return getIncompatibleError("i", "e");
747747

748748
if (HasF && HasZfinx)
749749
return getIncompatibleError("f", "zfinx");
@@ -778,13 +778,13 @@ Error RISCVISAInfo::checkDependency() {
778778

779779
if (Exts.count("xwchc") != 0) {
780780
if (XLen != 32)
781-
return getError("'Xwchc' is only supported for 'rv32'");
781+
return getError("'xwchc' is only supported for 'rv32'");
782782

783783
if (HasD)
784-
return getIncompatibleError("D", "Xwchc");
784+
return getIncompatibleError("d", "xwchc");
785785

786786
if (Exts.count("zcb") != 0)
787-
return getIncompatibleError("Xwchc", "Zcb");
787+
return getIncompatibleError("xwchc", "zcb");
788788
}
789789

790790
return Error::success();

llvm/unittests/TargetParser/RISCVISAInfoTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,17 +623,17 @@ TEST(ParseArchString, RejectsConflictingExtensions) {
623623

624624
for (StringRef Input : {"rv64i_xwchc"}) {
625625
EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
626-
"'Xwchc' is only supported for 'rv32'");
626+
"'xwchc' is only supported for 'rv32'");
627627
}
628628

629629
for (StringRef Input : {"rv32id_xwchc"}) {
630630
EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
631-
"'D' and 'Xwchc' extensions are incompatible");
631+
"'d' and 'xwchc' extensions are incompatible");
632632
}
633633

634634
for (StringRef Input : {"rv32i_zcb_xwchc"}) {
635635
EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
636-
"'Xwchc' and 'Zcb' extensions are incompatible");
636+
"'xwchc' and 'zcb' extensions are incompatible");
637637
}
638638
}
639639

0 commit comments

Comments
 (0)