Skip to content

Commit

Permalink
write-newline
Browse files Browse the repository at this point in the history
  • Loading branch information
danakj committed Dec 9, 2024
1 parent fb7840f commit 228273f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion toolchain/check/dump_id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ auto DumpIdImpl(SemIR::LocId loc_id, const Context& context) -> void {
}

template <>
auto DumpIdMethods<Context>::Newline() const -> void {
auto DumpIdMethods<Context>::WriteNewline() const -> void {
llvm::errs() << "\n";
}

Expand Down
5 changes: 3 additions & 2 deletions toolchain/check/dump_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ class DumpIdMethods {
}
LLVM_DUMP_METHOD auto DumpId(SemIR::LocId loc_id) const -> void {
DumpIdImpl(loc_id, static_cast<const Context&>(*this));
Newline();
WriteNewline();
}

private:
auto Newline() const -> void;
// Helper to keep stream includes out of the header file.
auto WriteNewline() const -> void;
};

} // namespace Carbon::Check
Expand Down
2 changes: 1 addition & 1 deletion toolchain/lex/dump_id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ auto DumpIdImpl(TokenIndex token, const TokenizedBuffer& buffer) -> void {
}

template <>
auto DumpIdMethods<TokenizedBuffer>::Newline() const -> void {
auto DumpIdMethods<TokenizedBuffer>::WriteNewline() const -> void {
llvm::errs() << "\n";
}

Expand Down
5 changes: 3 additions & 2 deletions toolchain/lex/dump_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ class DumpIdMethods {
public:
LLVM_DUMP_METHOD auto DumpId(TokenIndex token) const -> void {
DumpIdImpl(token, static_cast<const TokenizedBuffer&>(*this));
Newline();
WriteNewline();
}

private:
auto Newline() const -> void;
// Helper to keep stream includes out of the header file.
auto WriteNewline() const -> void;
};

} // namespace Carbon::Lex
Expand Down
2 changes: 1 addition & 1 deletion toolchain/parse/dump_id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ auto DumpIdImpl(NodeId node_id, const Tree& tree) -> void {
}

template <>
auto DumpIdMethods<Tree>::Newline() const -> void {
auto DumpIdMethods<Tree>::WriteNewline() const -> void {
llvm::errs() << "\n";
}

Expand Down
5 changes: 3 additions & 2 deletions toolchain/parse/dump_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ class DumpIdMethods {
}
LLVM_DUMP_METHOD auto DumpId(NodeId node_id) const -> void {
DumpIdImpl(node_id, static_cast<const Tree&>(*this));
Newline();
WriteNewline();
}

private:
auto Newline() const -> void;
// Helper to keep stream includes out of the header file.
auto WriteNewline() const -> void;
};

} // namespace Carbon::Parse
Expand Down

0 comments on commit 228273f

Please sign in to comment.