LLVM
3.7.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
work
release_test
rc4
llvm.src
include
llvm
Object
Object/Error.h
Go to the documentation of this file.
1
//===- Error.h - system_error extensions for Object -------------*- C++ -*-===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This declares a new error_category for the Object library.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_OBJECT_ERROR_H
15
#define LLVM_OBJECT_ERROR_H
16
17
#include <system_error>
18
19
namespace
llvm {
20
namespace
object {
21
22
const
std::error_category
&
object_category
();
23
24
enum class
object_error
{
25
// Error code 0 is absent. Use std::error_code() instead.
26
arch_not_found
= 1,
27
invalid_file_type
,
28
parse_failed
,
29
unexpected_eof
,
30
string_table_non_null_end
,
31
invalid_section_index
,
32
bitcode_section_not_found
,
33
macho_small_load_command
,
34
macho_load_segment_too_many_sections
,
35
macho_load_segment_too_small
,
36
};
37
38
inline
std::error_code
make_error_code
(
object_error
e) {
39
return
std::error_code(static_cast<int>(e),
object_category
());
40
}
41
42
}
// end namespace object.
43
44
}
// end namespace llvm.
45
46
namespace
std {
47
template
<>
48
struct
is_error_code_enum<llvm::
object::object_error
> : std::true_type {};
49
}
50
51
#endif
llvm::object::object_error::unexpected_eof
llvm::object::make_error_code
std::error_code make_error_code(object_error e)
Definition:
Object/Error.h:38
llvm::object::object_error::parse_failed
llvm::object::object_error::macho_load_segment_too_small
llvm::object::object_category
const std::error_category & object_category()
Definition:
Object/Error.cpp:63
llvm::object::object_error::arch_not_found
llvm::object::object_error::string_table_non_null_end
llvm::object::object_error::invalid_file_type
llvm::object::object_error::macho_small_load_command
llvm::object::object_error
object_error
Definition:
Object/Error.h:24
error_category
static ManagedStatic< _object_error_category > error_category
Definition:
Object/Error.cpp:61
llvm::object::object_error::invalid_section_index
llvm::object::object_error::macho_load_segment_too_many_sections
llvm::object::object_error::bitcode_section_not_found
Generated on Mon Aug 31 2015 11:00:37 for LLVM by
1.8.6