mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
Remove all uses of 'using std::error_code' from headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210866 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -22,7 +22,6 @@
|
||||
#include "llvm/Support/type_traits.h"
|
||||
|
||||
namespace llvm {
|
||||
using std::error_code;
|
||||
namespace ARM {
|
||||
namespace EHABI {
|
||||
|
||||
|
@ -189,9 +189,9 @@ Decoder::getSectionContaining(const COFFObjectFile &COFF, uint64_t VA) {
|
||||
uint64_t Address;
|
||||
uint64_t Size;
|
||||
|
||||
if (error_code EC = Section.getAddress(Address))
|
||||
if (std::error_code EC = Section.getAddress(Address))
|
||||
return EC;
|
||||
if (error_code EC = Section.getSize(Size))
|
||||
if (std::error_code EC = Section.getSize(Size))
|
||||
return EC;
|
||||
|
||||
if (VA >= Address && (VA - Address) <= Size)
|
||||
@ -205,14 +205,14 @@ ErrorOr<object::SymbolRef> Decoder::getSymbol(const COFFObjectFile &COFF,
|
||||
for (const auto &Symbol : COFF.symbols()) {
|
||||
if (FunctionOnly) {
|
||||
SymbolRef::Type Type;
|
||||
if (error_code EC = Symbol.getType(Type))
|
||||
if (std::error_code EC = Symbol.getType(Type))
|
||||
return EC;
|
||||
if (Type != SymbolRef::ST_Function)
|
||||
continue;
|
||||
}
|
||||
|
||||
uint64_t Address;
|
||||
if (error_code EC = Symbol.getAddress(Address))
|
||||
if (std::error_code EC = Symbol.getAddress(Address))
|
||||
return EC;
|
||||
if (Address == VA)
|
||||
return Symbol;
|
||||
@ -728,17 +728,17 @@ void Decoder::dumpProcedureData(const COFFObjectFile &COFF,
|
||||
break;
|
||||
}
|
||||
|
||||
error_code Decoder::dumpProcedureData(const COFFObjectFile &COFF) {
|
||||
std::error_code Decoder::dumpProcedureData(const COFFObjectFile &COFF) {
|
||||
for (const auto &Section : COFF.sections()) {
|
||||
StringRef SectionName;
|
||||
if (error_code EC = COFF.getSectionName(COFF.getCOFFSection(Section),
|
||||
SectionName))
|
||||
if (std::error_code EC =
|
||||
COFF.getSectionName(COFF.getCOFFSection(Section), SectionName))
|
||||
return EC;
|
||||
|
||||
if (SectionName.startswith(".pdata"))
|
||||
dumpProcedureData(COFF, Section);
|
||||
}
|
||||
return error_code();
|
||||
return std::error_code();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "llvm/Support/ErrorOr.h"
|
||||
|
||||
namespace llvm {
|
||||
using std::error_code;
|
||||
namespace ARM {
|
||||
namespace WinEH {
|
||||
class RuntimeFunction;
|
||||
@ -110,7 +109,7 @@ class Decoder {
|
||||
|
||||
public:
|
||||
Decoder(StreamWriter &SW) : SW(SW), OS(SW.getOStream()) {}
|
||||
error_code dumpProcedureData(const object::COFFObjectFile &COFF);
|
||||
std::error_code dumpProcedureData(const object::COFFObjectFile &COFF);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,7 @@
|
||||
using namespace llvm;
|
||||
using namespace llvm::object;
|
||||
using namespace llvm::Win64EH;
|
||||
using std::error_code;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
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;
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <system_error>
|
||||
|
||||
namespace llvm {
|
||||
using std::error_code;
|
||||
const std::error_category &readobj_category();
|
||||
|
||||
enum class readobj_error {
|
||||
@ -29,8 +28,8 @@ enum class readobj_error {
|
||||
unknown_symbol
|
||||
};
|
||||
|
||||
inline error_code make_error_code(readobj_error e) {
|
||||
return error_code(static_cast<int>(e), readobj_category());
|
||||
inline std::error_code make_error_code(readobj_error e) {
|
||||
return std::error_code(static_cast<int>(e), readobj_category());
|
||||
}
|
||||
|
||||
} // namespace llvm
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
using namespace llvm;
|
||||
using namespace object;
|
||||
using std::error_code;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include <system_error>
|
||||
|
||||
namespace llvm {
|
||||
using std::error_code;
|
||||
namespace object {
|
||||
class ObjectFile;
|
||||
}
|
||||
@ -45,15 +44,17 @@ protected:
|
||||
StreamWriter& W;
|
||||
};
|
||||
|
||||
error_code createCOFFDumper(const object::ObjectFile *Obj, StreamWriter &Writer,
|
||||
std::unique_ptr<ObjDumper> &Result);
|
||||
std::error_code createCOFFDumper(const object::ObjectFile *Obj,
|
||||
StreamWriter &Writer,
|
||||
std::unique_ptr<ObjDumper> &Result);
|
||||
|
||||
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);
|
||||
|
||||
error_code createMachODumper(const object::ObjectFile *Obj,
|
||||
StreamWriter &Writer,
|
||||
std::unique_ptr<ObjDumper> &Result);
|
||||
std::error_code createMachODumper(const object::ObjectFile *Obj,
|
||||
StreamWriter &Writer,
|
||||
std::unique_ptr<ObjDumper> &Result);
|
||||
|
||||
} // namespace llvm
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "llvm/Support/Win64EH.h"
|
||||
|
||||
namespace llvm {
|
||||
using std::error_code;
|
||||
namespace object {
|
||||
class COFFObjectFile;
|
||||
class SymbolRef;
|
||||
@ -27,8 +26,9 @@ class Dumper {
|
||||
raw_ostream &OS;
|
||||
|
||||
public:
|
||||
typedef error_code (*SymbolResolver)(const object::coff_section *, uint64_t,
|
||||
object::SymbolRef &, void *);
|
||||
typedef std::error_code (*SymbolResolver)(const object::coff_section *,
|
||||
uint64_t, object::SymbolRef &,
|
||||
void *);
|
||||
|
||||
struct Context {
|
||||
const object::COFFObjectFile &COFF;
|
||||
|
@ -41,6 +41,7 @@
|
||||
|
||||
using namespace llvm;
|
||||
using namespace llvm::object;
|
||||
using std::error_code;
|
||||
|
||||
namespace opts {
|
||||
cl::list<std::string> InputFilenames(cl::Positional,
|
||||
|
@ -14,13 +14,12 @@
|
||||
#include <string>
|
||||
|
||||
namespace llvm {
|
||||
using std::error_code;
|
||||
namespace object {
|
||||
class RelocationRef;
|
||||
}
|
||||
|
||||
// Various helper functions.
|
||||
bool error(error_code ec);
|
||||
bool error(std::error_code ec);
|
||||
bool relocAddressLess(object::RelocationRef A,
|
||||
object::RelocationRef B);
|
||||
} // namespace llvm
|
||||
|
Reference in New Issue
Block a user