From 7d2a2518e828483d0dbe357de66f4c97a97e27bb Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Sat, 28 Jul 2001 04:41:27 +0000 Subject: [PATCH] Added function printIndent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/StringExtras.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/llvm/Support/StringExtras.h b/include/llvm/Support/StringExtras.h index 585a42ca4c8..a9e6bb3e837 100644 --- a/include/llvm/Support/StringExtras.h +++ b/include/llvm/Support/StringExtras.h @@ -67,4 +67,10 @@ static inline string ftostr(double V) { return Buffer; } +static inline void +printIndent(unsigned int indent, ostream& os=cout, const char* const istr=" ") +{ + for (unsigned i=0; i < indent; i++) + os << istr; +} #endif -- 2.34.1