Added function printIndent.
authorVikram S. Adve <vadve@cs.uiuc.edu>
Sat, 28 Jul 2001 04:41:27 +0000 (04:41 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Sat, 28 Jul 2001 04:41:27 +0000 (04:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/StringExtras.h

index 585a42ca4c8fd5efd9bbc507913b030d07699876..a9e6bb3e83707a48df1d1dce39550481e84534cd 100644 (file)
@@ -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