[llvm] 97bd6d6 - MCPseudoProbe: don't copy std::list. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 27 13:00:48 PDT 2023
Author: Fangrui Song
Date: 2023-09-27T13:00:43-07:00
New Revision: 97bd6d60be8af4279efad1d2b064882574218028
URL: https://github.com/llvm/llvm-project/commit/97bd6d60be8af4279efad1d2b064882574218028
DIFF: https://github.com/llvm/llvm-project/commit/97bd6d60be8af4279efad1d2b064882574218028.diff
LOG: MCPseudoProbe: don't copy std::list. NFC
Added:
Modified:
llvm/lib/MC/MCPseudoProbe.cpp
Removed:
################################################################################
diff --git a/llvm/lib/MC/MCPseudoProbe.cpp b/llvm/lib/MC/MCPseudoProbe.cpp
index f493aef14c8a0f5..ec9d0865888e45c 100644
--- a/llvm/lib/MC/MCPseudoProbe.cpp
+++ b/llvm/lib/MC/MCPseudoProbe.cpp
@@ -572,9 +572,8 @@ void MCPseudoProbeDecoder::printProbeForAddress(raw_ostream &OS,
}
void MCPseudoProbeDecoder::printProbesForAllAddresses(raw_ostream &OS) {
- std::vector<uint64_t> Addresses;
- for (auto Entry : Address2ProbesMap)
- Addresses.push_back(Entry.first);
+ auto Entries = make_first_range(Address2ProbesMap);
+ SmallVector<uint64_t, 0> Addresses(Entries.begin(), Entries.end());
llvm::sort(Addresses);
for (auto K : Addresses) {
OS << "Address:\t";
More information about the llvm-commits
mailing list