mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Remove 'using std::error_code' from tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210876 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user