Update usage comments in Printable.h. NFC.

The example wouldn't compile, and used an invalid case style for a
function.

Reviewed By: MatzeB

Differential Revision: https://reviews.llvm.org/D128176
This commit is contained in:
Fraser Cormack 2022-06-20 11:03:19 +01:00
parent d3cf49e984
commit 398834f45b
1 changed files with 4 additions and 4 deletions

View File

@ -24,12 +24,12 @@ class raw_ostream;
/// This class is useful to construct print helpers for raw_ostream.
///
/// Example:
/// Printable PrintRegister(unsigned Register) {
/// Printable printRegister(unsigned Register) {
/// return Printable([Register](raw_ostream &OS) {
/// OS << getRegisterName(Register);
/// }
/// });
/// }
/// ... OS << PrintRegister(Register); ...
/// ... OS << printRegister(Register); ...
///
/// Implementation note: Ideally this would just be a typedef, but doing so
/// leads to operator << being ambiguous as function has matching constructors
@ -47,6 +47,6 @@ inline raw_ostream &operator<<(raw_ostream &OS, const Printable &P) {
return OS;
}
}
} // namespace llvm
#endif