diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-11-30 15:07:30 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-11-30 15:07:30 +0000 |
commit | c55edcf93ec47a576cb0093592fe0944fec5de70 (patch) | |
tree | 549b853beacdade6a967a56fcff2c55ea9cff42c /lib/Lex/ModuleMap.cpp | |
parent | 7f5fd8e79c5e528da0307792efd354ffa202722d (diff) |
Use raw_ostream::indent.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145492 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/ModuleMap.cpp')
-rw-r--r-- | lib/Lex/ModuleMap.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
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"; } |