[llvm] [clang] [RISCV] Deduplicate RISCVISAInfo::toFeatures/toFeatureVector. NFC (PR #76942)

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 18:52:58 PST 2024


================
@@ -470,17 +470,17 @@ std::vector<std::string> RISCVISAInfo::toFeatures(bool AddAllExtensions,
                                                   bool IgnoreUnknown) const {
   std::vector<std::string> Features;
   for (auto const &Ext : Exts) {
-    std::string ExtName = Ext.first;
+    StringRef ExtName = Ext.first;
----------------
compnerd wrote:

Can we just use destructuring yet?

```c++
for (const auto &[ExtName, _] : Exts) {
```

https://github.com/llvm/llvm-project/pull/76942


More information about the llvm-commits mailing list