[llvm] [NFC][MemProf] Fix typo in type name (PR #140500)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Mon May 19 15:15:55 PDT 2025
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/140500
>From dbf627c5d72126a40b58139c28e0ac2d800f6c06 Mon Sep 17 00:00:00 2001
From: Snehasish Kumar <snehasishk at google.com>
Date: Fri, 16 May 2025 18:19:53 -0700
Subject: [PATCH] Fix typo in type name
---
llvm/include/llvm/ProfileData/MemProf.h | 14 +++++++-------
llvm/unittests/ProfileData/InstrProfTest.cpp | 6 +++---
llvm/unittests/ProfileData/MemProfTest.cpp | 10 +++++-----
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/llvm/include/llvm/ProfileData/MemProf.h b/llvm/include/llvm/ProfileData/MemProf.h
index 06d17438fa70f..e713c3807611b 100644
--- a/llvm/include/llvm/ProfileData/MemProf.h
+++ b/llvm/include/llvm/ProfileData/MemProf.h
@@ -1090,18 +1090,18 @@ struct IndexedMemProfData {
// A convenience wrapper around FrameIdConverter and CallStackIdConverter for
// tests.
-struct IndexedCallstackIdConveter {
- IndexedCallstackIdConveter() = delete;
- IndexedCallstackIdConveter(IndexedMemProfData &MemProfData)
+struct IndexedCallstackIdConverter {
+ IndexedCallstackIdConverter() = delete;
+ IndexedCallstackIdConverter(IndexedMemProfData &MemProfData)
: FrameIdConv(MemProfData.Frames),
CSIdConv(MemProfData.CallStacks, FrameIdConv) {}
// Delete the copy constructor and copy assignment operator to avoid a
- // situation where a copy of IndexedCallStackIdConverter gets an error in
+ // situation where a copy of IndexedCallstackIdConverter gets an error in
// LastUnmappedId while the original instance doesn't.
- IndexedCallstackIdConveter(const IndexedCallstackIdConveter &) = delete;
- IndexedCallstackIdConveter &
- operator=(const IndexedCallstackIdConveter &) = delete;
+ IndexedCallstackIdConverter(const IndexedCallstackIdConverter &) = delete;
+ IndexedCallstackIdConverter &
+ operator=(const IndexedCallstackIdConverter &) = delete;
std::vector<Frame> operator()(CallStackId CSId) { return CSIdConv(CSId); }
diff --git a/llvm/unittests/ProfileData/InstrProfTest.cpp b/llvm/unittests/ProfileData/InstrProfTest.cpp
index 34b1187c0b842..a0bd41bccf928 100644
--- a/llvm/unittests/ProfileData/InstrProfTest.cpp
+++ b/llvm/unittests/ProfileData/InstrProfTest.cpp
@@ -457,7 +457,7 @@ TEST_F(InstrProfTest, test_memprof_v2_full_schema) {
ASSERT_THAT_ERROR(RecordOr.takeError(), Succeeded());
const memprof::MemProfRecord &Record = RecordOr.get();
- memprof::IndexedCallstackIdConveter CSIdConv(MemProfData);
+ memprof::IndexedCallstackIdConverter CSIdConv(MemProfData);
const ::llvm::memprof::MemProfRecord WantRecord =
IndexedMR.toMemProfRecord(CSIdConv);
@@ -491,7 +491,7 @@ TEST_F(InstrProfTest, test_memprof_v2_partial_schema) {
ASSERT_THAT_ERROR(RecordOr.takeError(), Succeeded());
const memprof::MemProfRecord &Record = RecordOr.get();
- memprof::IndexedCallstackIdConveter CSIdConv(MemProfData);
+ memprof::IndexedCallstackIdConverter CSIdConv(MemProfData);
const ::llvm::memprof::MemProfRecord WantRecord =
IndexedMR.toMemProfRecord(CSIdConv);
@@ -609,7 +609,7 @@ TEST_F(InstrProfTest, test_memprof_merge) {
std::optional<memprof::FrameId> LastUnmappedFrameId;
- memprof::IndexedCallstackIdConveter CSIdConv(MemProfData);
+ memprof::IndexedCallstackIdConverter CSIdConv(MemProfData);
const ::llvm::memprof::MemProfRecord WantRecord =
IndexedMR.toMemProfRecord(CSIdConv);
diff --git a/llvm/unittests/ProfileData/MemProfTest.cpp b/llvm/unittests/ProfileData/MemProfTest.cpp
index ea36727df1bee..b1937992ea7f4 100644
--- a/llvm/unittests/ProfileData/MemProfTest.cpp
+++ b/llvm/unittests/ProfileData/MemProfTest.cpp
@@ -554,7 +554,7 @@ TEST(MemProf, IndexedMemProfRecordToMemProfRecord) {
IndexedRecord.CallSites.push_back(IndexedCallSiteInfo(CS3Id));
IndexedRecord.CallSites.push_back(IndexedCallSiteInfo(CS4Id));
- IndexedCallstackIdConveter CSIdConv(MemProfData);
+ IndexedCallstackIdConverter CSIdConv(MemProfData);
MemProfRecord Record = IndexedRecord.toMemProfRecord(CSIdConv);
@@ -591,7 +591,7 @@ TEST(MemProf, MissingCallStackId) {
// Create empty maps.
IndexedMemProfData MemProfData;
- IndexedCallstackIdConveter CSIdConv(MemProfData);
+ IndexedCallstackIdConverter CSIdConv(MemProfData);
// We are only interested in errors, not the return value.
(void)IndexedMR.toMemProfRecord(CSIdConv);
@@ -609,7 +609,7 @@ TEST(MemProf, MissingFrameId) {
IndexedMemProfRecord IndexedMR;
IndexedMR.AllocSites.emplace_back(CSId, makePartialMIB(), getHotColdSchema());
- IndexedCallstackIdConveter CSIdConv(MemProfData);
+ IndexedCallstackIdConverter CSIdConv(MemProfData);
// We are only interested in errors, not the return value.
(void)IndexedMR.toMemProfRecord(CSIdConv);
@@ -763,7 +763,7 @@ TEST(MemProf, YAMLParser) {
const auto &[GUID, IndexedRecord] = MemProfData.Records.front();
EXPECT_EQ(GUID, 0xdeadbeef12345678ULL);
- IndexedCallstackIdConveter CSIdConv(MemProfData);
+ IndexedCallstackIdConverter CSIdConv(MemProfData);
MemProfRecord Record = IndexedRecord.toMemProfRecord(CSIdConv);
ASSERT_THAT(Record.AllocSites, SizeIs(2));
@@ -814,7 +814,7 @@ TEST(MemProf, YAMLParserGUID) {
const auto &[GUID, IndexedRecord] = MemProfData.Records.front();
EXPECT_EQ(GUID, IndexedMemProfRecord::getGUID("_Z3fooi"));
- IndexedCallstackIdConveter CSIdConv(MemProfData);
+ IndexedCallstackIdConverter CSIdConv(MemProfData);
MemProfRecord Record = IndexedRecord.toMemProfRecord(CSIdConv);
ASSERT_THAT(Record.AllocSites, SizeIs(1));
More information about the llvm-commits
mailing list