From b4f9162078a4a5e92f925269888dcafe19bda7de Mon Sep 17 00:00:00 2001 From: Massimo Fioravanti Date: Thu, 23 Dec 2021 16:07:02 +0100 Subject: [PATCH] Introduce helper function to emit indentation --- include/revng/Support/Debug.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/revng/Support/Debug.h b/include/revng/Support/Debug.h index 25ee14f58..c40c9c487 100644 --- a/include/revng/Support/Debug.h +++ b/include/revng/Support/Debug.h @@ -23,6 +23,13 @@ extern size_t MaxLoggerNameLength; #define debug_function __attribute__((used, noinline)) +/// \brief Emits \p Indentation space pairs +template +void indent(Stream &Output, size_t Indentation) { + for (size_t I = 0; I < Indentation; I++) + Output << " "; +} + /// \brief Stream an instance of this class to call Logger::emit() struct LogTerminator { const char *File;