14#include "llvm/ADT/Twine.h"
15#include "llvm/Support/Debug.h"
18 auto &os = llvm::dbgs();
19 auto start = os.tell();
20 os <<
"===- " << str <<
" ";
21 auto endAct = os.tell() + 4;
22 auto endExp = start + width;
23 while (endAct < endExp) {
33 return debugHeader(llvm::Twine(
"Running ") + pass->getName());
37 auto &os = llvm::dbgs();
38 auto start = os.tell();
40 auto endAct = os.tell() + 3;
41 auto endExp = start + width;
42 while (endAct < endExp) {
llvm::raw_ostream & debugHeader(const llvm::Twine &str, unsigned width=80)
Write a "header"-like string to the debug stream with a certain width.
llvm::raw_ostream & debugPassHeader(const mlir::Pass *pass, unsigned width=80)
Write a boilerplate header for a pass to the debug stream.
llvm::raw_ostream & debugFooter(unsigned width=80)
Write a boilerplate footer to the debug stream to indicate that a pass has ended.