LLVM: include/llvm/Object/Error.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_OBJECT_ERROR_H

14#define LLVM_OBJECT_ERROR_H

15

18#include <system_error>

19

20namespace llvm {

21

23

25

27

40

44

45

46

47

48

49

50

51

52

54 void anchor() override;

55public:

56 static char ID;

61};

62

63

64

65

66

68 : public ErrorInfo<GenericBinaryError, BinaryError> {

69public:

70 static char ID;

73 const std::string &getMessage() const { return Msg; }

75private:

76 std::string Msg;

77};

78

79

80

81

82

83

85

89

90}

91

92}

93

94namespace std {

95template <>

96struct is_error_code_enum<llvm::object::object_error> : std::true_type {};

97}

98

99#endif

void setErrorCode(std::error_code EC)

Base class for user error types.

Lightweight error class with error context and mandatory checking.

Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...

static char ID

Definition Error.h:56

BinaryError()

Definition Error.h:57

static char ID

Definition Error.h:70

GenericBinaryError(const Twine &Msg)

const std::string & getMessage() const

Definition Error.h:73

This class implements an extremely fast bulk output stream that can only output to a stream.

Error createError(const Twine &Err)

Definition Error.h:86

std::error_code make_error_code(object_error e)

Definition Error.h:41

object_error

Definition Error.h:28

@ invalid_section_index

Definition Error.h:35

@ string_table_non_null_end

Definition Error.h:34

@ unexpected_eof

Definition Error.h:33

@ section_stripped

Definition Error.h:38

@ invalid_symbol_index

Definition Error.h:37

@ arch_not_found

Definition Error.h:30

@ bitcode_section_not_found

Definition Error.h:36

@ invalid_file_type

Definition Error.h:31

@ parse_failed

Definition Error.h:32

LLVM_ABI const std::error_category & object_category()

LLVM_ABI Error isNotObjectErrorInvalidFileType(llvm::Error Err)

isNotObjectErrorInvalidFileType() is used when looping through the children of an archive after calli...

This is an optimization pass for GlobalISel generic memory operations.

Error make_error(ArgTs &&... Args)

Make a Error instance representing failure using the given error info type.

Implement std::hash so that hash_code can be used in STL containers.