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:
parent
d3cf49e984
commit
398834f45b
|
|
@ -24,12 +24,12 @@ class raw_ostream;
|
||||||
/// This class is useful to construct print helpers for raw_ostream.
|
/// This class is useful to construct print helpers for raw_ostream.
|
||||||
///
|
///
|
||||||
/// Example:
|
/// Example:
|
||||||
/// Printable PrintRegister(unsigned Register) {
|
/// Printable printRegister(unsigned Register) {
|
||||||
/// return Printable([Register](raw_ostream &OS) {
|
/// return Printable([Register](raw_ostream &OS) {
|
||||||
/// OS << getRegisterName(Register);
|
/// OS << getRegisterName(Register);
|
||||||
/// }
|
/// });
|
||||||
/// }
|
/// }
|
||||||
/// ... OS << PrintRegister(Register); ...
|
/// ... OS << printRegister(Register); ...
|
||||||
///
|
///
|
||||||
/// Implementation note: Ideally this would just be a typedef, but doing so
|
/// Implementation note: Ideally this would just be a typedef, but doing so
|
||||||
/// leads to operator << being ambiguous as function has matching constructors
|
/// 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;
|
return OS;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} // namespace llvm
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue