Invoke a callback with a prefixed debug raw_ostream, like LDBG().
Synopsis
Declared in <llvm/Support/DebugLog.h>
#define LDBG_OS(…)
Description
Behaves like LDBG() but instead of streaming directly, it takes a callback that will be called with a raw_ostream. This is useful when you need to pass a raw_ostream to a helper function to be able to print (when the << operator is not available).
E.g., LDBG_OS([&]&Os) { Os << "Pass Manager contains: "; pm.printAsTextual(Os); });
Just like LDBG(), it optionally accepts a level and type arguments. E.g., LDBG_OS(2, [&]&Os) { ... }); LDBG_OS("debug_type", [&]&Os) { ... }); LDBG_OS("debug_type", 2, [&]&Os) { ... });
Created with MrDocs