RISCVISAInfo: Internalize struct FindByName
authorFangrui Song <i@maskray.me>
Thu, 24 Nov 2022 01:22:49 +0000 (17:22 -0800)
committerFangrui Song <i@maskray.me>
Thu, 24 Nov 2022 01:22:49 +0000 (17:22 -0800)
llvm/lib/Support/RISCVISAInfo.cpp

index fe9cc4c..3dea408 100644 (file)
@@ -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.