From a3165167f4c1fdea4525f3dd475158b36a631694 Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Mon, 10 Mar 2025 10:57:46 -0700 Subject: [PATCH] [ctxprof][nfc] Drop `Section` in `writeFlatSection` --- llvm/include/llvm/ProfileData/PGOCtxProfWriter.h | 4 ++-- llvm/lib/ProfileData/PGOCtxProfWriter.cpp | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h b/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h index 82cf787153cd9..40f355f99eb53 100644 --- a/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h +++ b/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h @@ -88,8 +88,8 @@ class PGOCtxProfileWriter final : public ctx_profile::ProfileWriter { void endContextSection() override; void startFlatSection(); - void writeFlatSection(ctx_profile::GUID Guid, const uint64_t *Buffer, - size_t BufferSize); + void writeFlat(ctx_profile::GUID Guid, const uint64_t *Buffer, + size_t BufferSize); void endFlatSection(); // constants used in writing which a reader may find useful. diff --git a/llvm/lib/ProfileData/PGOCtxProfWriter.cpp b/llvm/lib/ProfileData/PGOCtxProfWriter.cpp index d099572fc152a..e906836b16b2b 100644 --- a/llvm/lib/ProfileData/PGOCtxProfWriter.cpp +++ b/llvm/lib/ProfileData/PGOCtxProfWriter.cpp @@ -126,9 +126,8 @@ void PGOCtxProfileWriter::writeContextual(const ContextNode &RootNode) { writeImpl(std::nullopt, RootNode); } -void PGOCtxProfileWriter::writeFlatSection(ctx_profile::GUID Guid, - const uint64_t *Buffer, - size_t Size) { +void PGOCtxProfileWriter::writeFlat(ctx_profile::GUID Guid, + const uint64_t *Buffer, size_t Size) { Writer.EnterSubblock(PGOCtxProfileBlockIDs::FlatProfileBlockID, CodeLen); writeGuid(Guid); writeCounters({Buffer, Size}); @@ -240,7 +239,7 @@ Error llvm::createCtxProfFromYAML(StringRef Profile, raw_ostream &Out) { if (!SPR.FlatProfiles.empty()) { Writer.startFlatSection(); for (const auto &[Guid, Counters] : SPR.FlatProfiles) - Writer.writeFlatSection(Guid, Counters.data(), Counters.size()); + Writer.writeFlat(Guid, Counters.data(), Counters.size()); Writer.endFlatSection(); } if (EC)