================
@@ -351,14 +352,14 @@ static void getARMMultilibFlags(const Driver &D, const 
llvm::Triple &Triple,
   llvm::DenseSet<StringRef> FeatureSet(UnifiedFeatures.begin(),
                                        UnifiedFeatures.end());
   std::vector<std::string> MArch;
-  for (const auto &Ext : ARM::ARCHExtNames)
-    if (!Ext.Name.empty())
-      if (FeatureSet.contains(Ext.Feature))
-        MArch.push_back(Ext.Name.str());
-  for (const auto &Ext : ARM::ARCHExtNames)
-    if (!Ext.Name.empty())
-      if (FeatureSet.contains(Ext.NegFeature))
-        MArch.push_back(("no" + Ext.Name).str());
+  for (const auto &Ext : ARM::getArchExts())
+    if (!Ext.name().empty())
+      if (FeatureSet.contains(Ext.name(1)))
----------------
mplatings wrote:

I'm not sufficiently familiar with your new EnumStrings class to judge what 
would fit well there.
I wouldn't be happy with comments.
I don't love it, but something this would be clearer:
```
enum ArchExtField {
ArchExtFeature = 1
};
// ...
Ext.name(ArchExtFeature);
```

If you want more background on the class of problem: 
https://en.wikipedia.org/wiki/Magic_number_(programming)

https://github.com/llvm/llvm-project/pull/206937
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to