[cfe-commits] r145492 - /cfe/trunk/lib/Lex/ModuleMap.cpp
Benjamin Kramer
benny.kra at googlemail.com
Wed Nov 30 07:07:30 PST 2011
Author: d0k
Date: Wed Nov 30 09:07:30 2011
New Revision: 145492
URL: http://llvm.org/viewvc/llvm-project?rev=145492&view=rev
Log:
Use raw_ostream::indent.
Modified:
cfe/trunk/lib/Lex/ModuleMap.cpp
Modified: cfe/trunk/lib/Lex/ModuleMap.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/ModuleMap.cpp?rev=145492&r1=145491&r2=145492&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/ModuleMap.cpp (original)
+++ cfe/trunk/lib/Lex/ModuleMap.cpp Wed Nov 30 09:07:30 2011
@@ -68,12 +68,8 @@
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 @@
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 @@
MI != MIEnd; ++MI)
MI->getValue()->print(OS, Indent + 2);
- indent(OS, Indent);
+ OS.indent(Indent);
OS << "}\n";
}
More information about the cfe-commits
mailing list