[#LDBG_OS]
= LDBG&lowbar;OS
:mrdocs:

Invoke a callback with a prefixed debug `raw&lowbar;ostream`, like LDBG()&period;

== Synopsis

Declared in `&lt;llvm&sol;Support&sol;DebugLog&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
#define LDBG&lowbar;OS(...)

----

== Description

Behaves like LDBG() but instead of streaming directly, it takes a callback that will be called with a raw&lowbar;ostream&period; This is useful when you need to pass a `raw&lowbar;ostream` to a helper function to be able to print (when the `&lt;&lt;` operator is not available)&period;

E&period;g&period;, LDBG&lowbar;OS(&lsqb;&amp;&rsqb;&amp;Os) &lcub; Os &lt;&lt; &quot;Pass Manager contains&colon; &quot;&semi; pm&period;printAsTextual(Os)&semi; &rcub;)&semi;

Just like LDBG(), it optionally accepts a `level` and `type` arguments&period; E&period;g&period;, LDBG&lowbar;OS(2, &lsqb;&amp;&rsqb;&amp;Os) &lcub; &period;&period;&period; &rcub;)&semi; LDBG&lowbar;OS(&quot;debug&lowbar;type&quot;, &lsqb;&amp;&rsqb;&amp;Os) &lcub; &period;&period;&period; &rcub;)&semi; LDBG&lowbar;OS(&quot;debug&lowbar;type&quot;, 2, &lsqb;&amp;&rsqb;&amp;Os) &lcub; &period;&period;&period; &rcub;)&semi;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
