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 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 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));