summaryrefslogtreecommitdiff
path: root/tools/llvm-size
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-13 03:07:50 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-13 03:07:50 +0000
commit1ad45020ec8518a5c9bea7ec1007798a456bff56 (patch)
tree07430093f7f8e4eaf7cfa61b960406627e961c54 /tools/llvm-size
parent7532b4038f2ce16cc285ed6b3254053f30088faa (diff)
downloadllvm-1ad45020ec8518a5c9bea7ec1007798a456bff56.tar.gz
llvm-1ad45020ec8518a5c9bea7ec1007798a456bff56.tar.bz2
llvm-1ad45020ec8518a5c9bea7ec1007798a456bff56.tar.xz
Remove 'using std::error_code' from tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210876 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-size')
-rw-r--r--tools/llvm-size/llvm-size.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/llvm-size/llvm-size.cpp b/tools/llvm-size/llvm-size.cpp
index f0ec7fa6af..1ea22a937a 100644
--- a/tools/llvm-size/llvm-size.cpp
+++ b/tools/llvm-size/llvm-size.cpp
@@ -30,7 +30,6 @@
#include <system_error>
using namespace llvm;
using namespace object;
-using std::error_code;
enum OutputFormatTy {berkeley, sysv};
static cl::opt<OutputFormatTy>
@@ -69,7 +68,7 @@ static cl::list<std::string>
static std::string ToolName;
/// @brief If ec is not success, print the error and return true.
-static bool error(error_code ec) {
+static bool error(std::error_code ec) {
if (!ec) return false;
outs() << ToolName << ": error reading file: " << ec.message() << ".\n";
@@ -236,7 +235,7 @@ static void PrintFileSectionSizes(StringRef file) {
// Attempt to open the binary.
ErrorOr<Binary *> BinaryOrErr = createBinary(file);
- if (error_code EC = BinaryOrErr.getError()) {
+ if (std::error_code EC = BinaryOrErr.getError()) {
errs() << ToolName << ": " << file << ": " << EC.message() << ".\n";
return;
}
@@ -247,7 +246,7 @@ static void PrintFileSectionSizes(StringRef file) {
for (object::Archive::child_iterator i = a->child_begin(),
e = a->child_end(); i != e; ++i) {
std::unique_ptr<Binary> child;
- if (error_code ec = i->getAsBinary(child)) {
+ if (std::error_code ec = i->getAsBinary(child)) {
errs() << ToolName << ": " << file << ": " << ec.message() << ".\n";
continue;
}