Skip to content

[nfc] Small fixups (coding style) post- PR #129626 #129935

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions llvm/include/llvm/ProfileData/PGOCtxProfReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,16 @@ 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);

bool canEnterBlockWithID(PGOCtxProfileBlockIDs ID);
Error enterBlockWithID(PGOCtxProfileBlockIDs ID);

Error loadContexts(CtxProfContextualProfiles &);
Error loadContexts(CtxProfContextualProfiles &P);

public:
PGOCtxProfileReader(StringRef Buffer)
Expand All @@ -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
2 changes: 1 addition & 1 deletion llvm/include/llvm/ProfileData/PGOCtxProfWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 3 additions & 4 deletions llvm/lib/ProfileData/PGOCtxProfReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down