namespace lld {
-const llvm::error_category &native_reader_category();
+const std::error_category &native_reader_category();
enum class NativeReaderError {
success = 0,
return llvm::error_code(static_cast<int>(e), native_reader_category());
}
-const llvm::error_category &YamlReaderCategory();
+const std::error_category &YamlReaderCategory();
enum class YamlReaderError {
success = 0,
return llvm::error_code(static_cast<int>(e), YamlReaderCategory());
}
-const llvm::error_category &LinkerScriptReaderCategory();
+const std::error_category &LinkerScriptReaderCategory();
enum class LinkerScriptReaderError {
success = 0,
}
/// \brief Errors returned by InputGraph functionality
-const llvm::error_category &InputGraphErrorCategory();
+const std::error_category &InputGraphErrorCategory();
enum class InputGraphError {
success = 0,
}
/// \brief Errors returned by Reader.
-const llvm::error_category &ReaderErrorCategory();
+const std::error_category &ReaderErrorCategory();
enum class ReaderError {
success = 0,
using namespace lld;
-class _NativeReaderErrorCategory : public llvm::error_category {
+class _NativeReaderErrorCategory : public std::error_category {
public:
const char* name() const LLVM_NOEXCEPT override {
return "lld.native.reader";
}
};
-const llvm::error_category &lld::native_reader_category() {
+const std::error_category &lld::native_reader_category() {
static _NativeReaderErrorCategory o;
return o;
}
-class _YamlReaderErrorCategory : public llvm::error_category {
+class _YamlReaderErrorCategory : public std::error_category {
public:
const char* name() const LLVM_NOEXCEPT override {
return "lld.yaml.reader";
}
};
-const llvm::error_category &lld::YamlReaderCategory() {
+const std::error_category &lld::YamlReaderCategory() {
static _YamlReaderErrorCategory o;
return o;
}
-class _LinkerScriptReaderErrorCategory : public llvm::error_category {
+class _LinkerScriptReaderErrorCategory : public std::error_category {
public:
const char *name() const LLVM_NOEXCEPT override {
return "lld.linker-script.reader";
}
};
-const llvm::error_category &lld::LinkerScriptReaderCategory() {
+const std::error_category &lld::LinkerScriptReaderCategory() {
static _LinkerScriptReaderErrorCategory o;
return o;
}
-class _InputGraphErrorCategory : public llvm::error_category {
+class _InputGraphErrorCategory : public std::error_category {
public:
const char *name() const LLVM_NOEXCEPT override {
return "lld.inputGraph.parse";
}
};
-const llvm::error_category &lld::InputGraphErrorCategory() {
+const std::error_category &lld::InputGraphErrorCategory() {
static _InputGraphErrorCategory i;
return i;
}
-class _ReaderErrorCategory : public llvm::error_category {
+class _ReaderErrorCategory : public std::error_category {
public:
const char *name() const LLVM_NOEXCEPT override {
return "lld.inputGraph.parse";
}
};
-const llvm::error_category &lld::ReaderErrorCategory() {
+const std::error_category &lld::ReaderErrorCategory() {
static _ReaderErrorCategory i;
return i;
}
/// Temporary class to enable make_dynamic_error_code() until
/// llvm::ErrorOr<> is updated to work with error encapsulations
/// other than error_code.
-class dynamic_error_category : public llvm::error_category {
+class dynamic_error_category : public std::error_category {
public:
const char *name() const LLVM_NOEXCEPT override {
return "lld.dynamic_error";