From c55edcf93ec47a576cb0093592fe0944fec5de70 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 30 Nov 2011 15:07:30 +0000 Subject: Use raw_ostream::indent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145492 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Lex/ModuleMap.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'lib/Lex/ModuleMap.cpp') diff --git a/lib/Lex/ModuleMap.cpp b/lib/Lex/ModuleMap.cpp index 72d2bee796..bcf159646a 100644 --- a/lib/Lex/ModuleMap.cpp +++ b/lib/Lex/ModuleMap.cpp @@ -68,12 +68,8 @@ StringRef ModuleMap::Module::getTopLevelModuleName() const { return Top->Name; } -static void indent(llvm::raw_ostream &OS, unsigned Spaces) { - OS << std::string(Spaces, ' '); -} - void ModuleMap::Module::print(llvm::raw_ostream &OS, unsigned Indent) const { - indent(OS, Indent); + OS.indent(Indent); if (IsFramework) OS << "framework "; if (IsExplicit) @@ -81,14 +77,14 @@ void ModuleMap::Module::print(llvm::raw_ostream &OS, unsigned Indent) const { OS << "module " << Name << " {\n"; if (UmbrellaHeader) { - indent(OS, Indent + 2); + OS.indent(Indent + 2); OS << "umbrella \""; OS.write_escaped(UmbrellaHeader->getName()); OS << "\"\n"; } for (unsigned I = 0, N = Headers.size(); I != N; ++I) { - indent(OS, Indent + 2); + OS.indent(Indent + 2); OS << "header \""; OS.write_escaped(Headers[I]->getName()); OS << "\"\n"; @@ -99,7 +95,7 @@ void ModuleMap::Module::print(llvm::raw_ostream &OS, unsigned Indent) const { MI != MIEnd; ++MI) MI->getValue()->print(OS, Indent + 2); - indent(OS, Indent); + OS.indent(Indent); OS << "}\n"; } -- cgit v1.2.3-18-g5258