[llvm] 3af3525 - [ProfileData] Simplify InstrProfValueSiteRecord (NFC) (#95143)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 11 11:54:53 PDT 2024
Author: Kazu Hirata
Date: 2024-06-11T11:54:48-07:00
New Revision: 3af35251c8cd0729674076ab99c64cff6126c270
URL: https://github.com/llvm/llvm-project/commit/3af35251c8cd0729674076ab99c64cff6126c270
DIFF: https://github.com/llvm/llvm-project/commit/3af35251c8cd0729674076ab99c64cff6126c270.diff
LOG: [ProfileData] Simplify InstrProfValueSiteRecord (NFC) (#95143)
std::list default-constructs itself as an empty list, so we don't need
to call ValueData.clear() in the constructor.
Added:
Modified:
llvm/include/llvm/ProfileData/InstrProf.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h
index d6831eeaa794b..dae2caf0181e4 100644
--- a/llvm/include/llvm/ProfileData/InstrProf.h
+++ b/llvm/include/llvm/ProfileData/InstrProf.h
@@ -797,7 +797,7 @@ struct InstrProfValueSiteRecord {
/// Value profiling data pairs at a given value site.
std::list<InstrProfValueData> ValueData;
- InstrProfValueSiteRecord() { ValueData.clear(); }
+ InstrProfValueSiteRecord() = default;
template <class InputIterator>
InstrProfValueSiteRecord(InputIterator F, InputIterator L)
: ValueData(F, L) {}
More information about the llvm-commits
mailing list