[llvm] bc0caab - RISCVISAInfo: Internalize struct FindByName
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 17:22:54 PST 2022
Author: Fangrui Song
Date: 2022-11-23T17:22:49-08:00
New Revision: bc0caabef5b2fcf323601ce916ac9cf56be7ee09
URL: https://github.com/llvm/llvm-project/commit/bc0caabef5b2fcf323601ce916ac9cf56be7ee09
DIFF: https://github.com/llvm/llvm-project/commit/bc0caabef5b2fcf323601ce916ac9cf56be7ee09.diff
LOG: RISCVISAInfo: Internalize struct FindByName
Added:
Modified:
llvm/lib/Support/RISCVISAInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/RISCVISAInfo.cpp b/llvm/lib/Support/RISCVISAInfo.cpp
index fe9cc4c5d0f9..3dea408c2672 100644
--- a/llvm/lib/Support/RISCVISAInfo.cpp
+++ b/llvm/lib/Support/RISCVISAInfo.cpp
@@ -144,6 +144,7 @@ static size_t findFirstNonVersionCharacter(StringRef Ext) {
return Pos;
}
+namespace {
struct FindByName {
FindByName(StringRef Ext) : Ext(Ext){};
StringRef Ext;
@@ -151,6 +152,7 @@ struct FindByName {
return ExtInfo.Name == Ext;
}
};
+} // namespace
static Optional<RISCVExtensionVersion> findDefaultVersion(StringRef ExtName) {
// Find default version of an extension.
More information about the llvm-commits
mailing list