summaryrefslogtreecommitdiff
path: root/tools/llvm-ranlib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-29 23:02:20 +0000
committerChris Lattner <sabre@nondot.org>2010-11-29 23:02:20 +0000
commit424a04ec4e291fb25782eb412d57e3a36f880c6e (patch)
tree48e8f2a55eee1e3b390fd05df0e27b6e869270ef /tools/llvm-ranlib
parent75579f739fbc99a92a15f3ce75bbd7628ba00f8c (diff)
downloadllvm-424a04ec4e291fb25782eb412d57e3a36f880c6e.tar.gz
llvm-424a04ec4e291fb25782eb412d57e3a36f880c6e.tar.bz2
llvm-424a04ec4e291fb25782eb412d57e3a36f880c6e.tar.xz
convert llvm-ar and llvm-ranlib to raw_ostream from iostreams.
Patch by Danil Malyshev! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120341 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ranlib')
-rw-r--r--tools/llvm-ranlib/llvm-ranlib.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/llvm-ranlib/llvm-ranlib.cpp b/tools/llvm-ranlib/llvm-ranlib.cpp
index 5ee762a4cd..7f94c2413d 100644
--- a/tools/llvm-ranlib/llvm-ranlib.cpp
+++ b/tools/llvm-ranlib/llvm-ranlib.cpp
@@ -17,12 +17,10 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/PrettyStackTrace.h"
+#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Signals.h"
-#include <iostream>
-#include <iomanip>
#include <memory>
-
using namespace llvm;
// llvm-ar operation code and modifier flags
@@ -35,12 +33,12 @@ Verbose("verbose",cl::Optional,cl::init(false),
// printSymbolTable - print out the archive's symbol table.
void printSymbolTable(Archive* TheArchive) {
- std::cout << "\nArchive Symbol Table:\n";
+ outs() << "\nArchive Symbol Table:\n";
const Archive::SymTabType& symtab = TheArchive->getSymbolTable();
for (Archive::SymTabType::const_iterator I=symtab.begin(), E=symtab.end();
I != E; ++I ) {
unsigned offset = TheArchive->getFirstFileOffset() + I->second;
- std::cout << " " << std::setw(9) << offset << "\t" << I->first <<"\n";
+ outs() << " " << format("%9u", offset) << "\t" << I->first <<"\n";
}
}