[llvm] 5f70ed5 - [nfc] Small fixups (coding style) post- PR #129626 (#129935)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 6 10:58:18 PST 2025
Author: Mircea Trofin
Date: 2025-03-06T10:58:14-08:00
New Revision: 5f70ed5bdad826e3842da3ce86e54bef8df95dbe
URL: https://github.com/llvm/llvm-project/commit/5f70ed5bdad826e3842da3ce86e54bef8df95dbe
DIFF: https://github.com/llvm/llvm-project/commit/5f70ed5bdad826e3842da3ce86e54bef8df95dbe.diff
LOG: [nfc] Small fixups (coding style) post- PR #129626 (#129935)
Added:
Modified:
llvm/include/llvm/ProfileData/PGOCtxProfReader.h
llvm/include/llvm/ProfileData/PGOCtxProfWriter.h
llvm/lib/ProfileData/PGOCtxProfReader.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/ProfileData/PGOCtxProfReader.h b/llvm/include/llvm/ProfileData/PGOCtxProfReader.h
index dbd8288caaff5..33f03120a835a 100644
--- a/llvm/include/llvm/ProfileData/PGOCtxProfReader.h
+++ b/llvm/include/llvm/ProfileData/PGOCtxProfReader.h
@@ -186,8 +186,8 @@ class PGOCtxProfileReader final {
BitstreamCursor Cursor;
Expected<BitstreamEntry> advance();
Error readMetadata();
- Error wrongValue(const Twine &);
- Error unsupported(const Twine &);
+ Error wrongValue(const Twine &Msg);
+ Error unsupported(const Twine &Msg);
Expected<std::pair<std::optional<uint32_t>, PGOCtxProfContext>>
readProfile(PGOCtxProfileBlockIDs Kind);
@@ -195,7 +195,7 @@ class PGOCtxProfileReader final {
bool canEnterBlockWithID(PGOCtxProfileBlockIDs ID);
Error enterBlockWithID(PGOCtxProfileBlockIDs ID);
- Error loadContexts(CtxProfContextualProfiles &);
+ Error loadContexts(CtxProfContextualProfiles &P);
public:
PGOCtxProfileReader(StringRef Buffer)
@@ -205,6 +205,6 @@ class PGOCtxProfileReader final {
Expected<PGOCtxProfile> loadProfiles();
};
-void convertCtxProfToYaml(raw_ostream &OS, const PGOCtxProfile &);
+void convertCtxProfToYaml(raw_ostream &OS, const PGOCtxProfile &Profile);
} // namespace llvm
#endif
diff --git a/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h b/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h
index 8923fe57c180c..0ff11c998f02a 100644
--- a/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h
+++ b/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h
@@ -62,7 +62,7 @@ enum PGOCtxProfileBlockIDs {
/// like value profiling - which would appear as additional records. For
/// example, value profiling would produce a new record with a new record ID,
/// containing the profiled values (much like the counters)
-class PGOCtxProfileWriter : public ctx_profile::ProfileWriter {
+class PGOCtxProfileWriter final : public ctx_profile::ProfileWriter {
enum class EmptyContextCriteria { None, EntryIsZero, AllAreZero };
BitstreamWriter Writer;
diff --git a/llvm/lib/ProfileData/PGOCtxProfReader.cpp b/llvm/lib/ProfileData/PGOCtxProfReader.cpp
index bb912635879d2..63a6b013baba6 100644
--- a/llvm/lib/ProfileData/PGOCtxProfReader.cpp
+++ b/llvm/lib/ProfileData/PGOCtxProfReader.cpp
@@ -277,15 +277,14 @@ void toYaml(yaml::Output &Out, const PGOCtxProfContext &Ctx) {
} // namespace
-void llvm::convertCtxProfToYaml(raw_ostream &OS,
- const PGOCtxProfile &Profiles) {
+void llvm::convertCtxProfToYaml(raw_ostream &OS, const PGOCtxProfile &Profile) {
yaml::Output Out(OS);
void *SaveInfo = nullptr;
bool UseDefault = false;
Out.beginMapping();
- if (!Profiles.Contexts.empty()) {
+ if (!Profile.Contexts.empty()) {
Out.preflightKey("Contexts", false, false, UseDefault, SaveInfo);
- toYaml(Out, Profiles.Contexts);
+ toYaml(Out, Profile.Contexts);
Out.postflightKey(nullptr);
}
Out.endMapping();
More information about the llvm-commits
mailing list