aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2001-07-28 04:41:27 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2001-07-28 04:41:27 +0000
commit7d2a2518e828483d0dbe357de66f4c97a97e27bb (patch)
tree60601529eaa354361d7f7908ef535faec8ea4e7c /include
parentbf2b7e8beb4f7f38a68b1e2d6831bd024f2a379c (diff)
downloadexternal_llvm-7d2a2518e828483d0dbe357de66f4c97a97e27bb.zip
external_llvm-7d2a2518e828483d0dbe357de66f4c97a97e27bb.tar.gz
external_llvm-7d2a2518e828483d0dbe357de66f4c97a97e27bb.tar.bz2
Added function printIndent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/StringExtras.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/StringExtras.h b/include/llvm/Support/StringExtras.h
index 585a42c..a9e6bb3 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