[#llvm-PrintError-04a] = xref:llvm.adoc[llvm]::PrintError :relfileprefix: ../ :mrdocs: `PrintError` overloads == Synopses Declared in `<llvm/TableGen/Error.h>` Print an error diagnostic by writing into a colored error stream. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:llvm/PrintError-022.adoc[PrintError](xref:llvm/function_ref-03.adoc[function_ref<void(xref:llvm/raw_ostream.adoc[raw_ostream]&)>] PrintMsg); ---- [.small]#xref:llvm/PrintError-022.adoc[_» more..._]# Print an error diagnostic with message `Msg` and no source location. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:llvm/PrintError-044.adoc[PrintError](xref:llvm/Twine.adoc[Twine] const& Msg); ---- [.small]#xref:llvm/PrintError-044.adoc[_» more..._]# Print an error diagnostic at source location(s) `ErrorLoc.` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:llvm/PrintError-06.adoc[PrintError]( xref:llvm/ArrayRef-08.adoc[ArrayRef<SMLoc>] ErrorLoc, xref:llvm/Twine.adoc[Twine] const& Msg); ---- [.small]#xref:llvm/PrintError-06.adoc[_» more..._]# Print an error diagnostic at the location of record `Rec.` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:llvm/PrintError-0c.adoc[PrintError]( xref:llvm/Record.adoc[Record] const* Rec, xref:llvm/Twine.adoc[Twine] const& Msg); ---- [.small]#xref:llvm/PrintError-0c.adoc[_» more..._]# Print an error diagnostic at the location of field `RecVal.` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:llvm/PrintError-020.adoc[PrintError]( xref:llvm/RecordVal.adoc[RecordVal] const* RecVal, xref:llvm/Twine.adoc[Twine] const& Msg); ---- [.small]#xref:llvm/PrintError-020.adoc[_» more..._]# Print an error diagnostic at pointer location `Loc` within the buffer. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:llvm/PrintError-0a.adoc[PrintError]( char const* Loc, xref:llvm/Twine.adoc[Twine] const& Msg); ---- [.small]#xref:llvm/PrintError-0a.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *PrintMsg* | Callback that writes the error body to `OS.` | *Msg* | Error text to print. | *ErrorLoc* | Source locations associated with the error. | *Rec* | Record whose source location is used for the error. | *RecVal* | Record field whose source location is used for the error. | *Loc* | Pointer into a SourceMgr buffer identifying the error site. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#