Skip to content

Commit 34310c2

Browse files
committed
Add one more condition for lower_bound result
1 parent 938434f commit 34310c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/TargetParser/RISCVTargetParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ getExtensionBitmask(StringRef ExtName) {
150150
RISCVExtensionBitmaskTable::ExtensionBitmask;
151151
auto *I = llvm::lower_bound(ExtBitmasks, ExtName, LessExtName());
152152

153-
if (I != ExtBitmasks.end())
153+
if (I != ExtBitmasks.end() && ExtName.equals_insensitive(I->Name))
154154
return *I;
155155

156156
return RISCVExtensionBitmaskTable::RISCVExtensionBitmask();

0 commit comments

Comments
 (0)