[llvm] [llvm] Use llvm::append_range (NFC) (PR #135931)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 16 09:40:20 PDT 2025


================
@@ -1320,7 +1320,7 @@ class CfiFunctionIndex {
   std::vector<StringRef> symbols() const {
     std::vector<StringRef> Symbols;
     for (auto &[GUID, Syms] : Index)
-      Symbols.insert(Symbols.end(), Syms.begin(), Syms.end());
+      llvm::append_range(Symbols, Syms);
----------------
kazutakahirata wrote:

@kuhar I'm somewhat inclined to leaving the code as is.  The author is essentially naming the pair, which would otherwise remain named as `first` and `second`.  If we used `make_second_range`, the semantics of `Pair.second` is less clear.  The same would apply to doing things without structured bindings.  Thoughts?

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


More information about the llvm-commits mailing list