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:
Rafael Espindola
2014-06-13 03:07:50 +00:00
parent 7532b4038f
commit 1ad45020ec
33 changed files with 167 additions and 194 deletions

View File

@@ -30,7 +30,6 @@
using namespace llvm;
using namespace llvm::object;
using namespace ELF;
using std::error_code;
#define LLVM_READOBJ_ENUM_CASE(ns, enum) \
case ns::enum: return #enum;
@@ -82,15 +81,16 @@ template <class T> T errorOrDefault(ErrorOr<T> Val, T Default = T()) {
namespace llvm {
template <class ELFT>
static error_code createELFDumper(const ELFFile<ELFT> *Obj,
StreamWriter &Writer,
std::unique_ptr<ObjDumper> &Result) {
static std::error_code createELFDumper(const ELFFile<ELFT> *Obj,
StreamWriter &Writer,
std::unique_ptr<ObjDumper> &Result) {
Result.reset(new ELFDumper<ELFT>(Obj, Writer));
return readobj_error::success;
}
error_code createELFDumper(const object::ObjectFile *Obj, StreamWriter &Writer,
std::unique_ptr<ObjDumper> &Result) {
std::error_code createELFDumper(const object::ObjectFile *Obj,
StreamWriter &Writer,
std::unique_ptr<ObjDumper> &Result) {
// Little-endian 32-bit
if (const ELF32LEObjectFile *ELFObj = dyn_cast<ELF32LEObjectFile>(Obj))
return createELFDumper(ELFObj->getELFFile(), Writer, Result);