[llvm] [ProfileData] Simplify InstrProfValueSiteRecord (NFC) (PR #95143)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 11 09:49:38 PDT 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/95143
std::list default-constructs itself as an empty list, so we don't need
to call ValueData.clear() in the constructor.
>From c767453fd00d38fe883981dae1f075ff674d6747 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 11 Jun 2024 09:30:14 -0700
Subject: [PATCH] [ProfileData] Simplify InstrProfValueSiteRecord (NFC)
std::list default-constructs itself as an empty list, so we don't need
to call ValueData.clear() in the constructor.
---
llvm/include/llvm/ProfileData/InstrProf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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