LLVM: lib/TableGen/Error.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

20#include

21

22using namespace llvm;

23

26

28 const Twine &Msg) {

29

30

33

36 Locs = NullLoc;

40 "instantiated from multiclass");

41}

42

43

49

50

51

53

57

61

62

63

68

73

74

75

80

81

82

87

88

89

93

97

101

102

103

105

109

113

117

118

119

123

124

125

129

130

131

136

141

146

147

148

153

154

155

160

161

162

166 if (!CondValue) {

167 PrintError(Loc, "assert condition must of type bit, bits, or int.");

168 return true;

169 }

170 if (!CondValue->getValue()) {

172 StringRef AssertMsg = MessageInit ? MessageInit->getValue()

173 : "(assert message is not a string)";

174 PrintError(Loc, "assertion failed: " + AssertMsg);

175 return true;

176 }

177 return false;

178}

179

180

184 else

185 PrintError(Loc, "dump value is not of type string");

186}

static void fatal_exit()

Definition Error.cpp:44

static void PrintMessage(ArrayRef< SMLoc > Locs, SourceMgr::DiagKind Kind, const Twine &Msg)

Definition Error.cpp:27

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

bool empty() const

empty - Check if the array is empty.

const T & consume_front()

consume_front() - Returns the first element and drops it from ArrayRef.

virtual const Init * convertInitializerTo(const RecTy *Ty) const =0

Convert to a value whose type is Ty, or return null if this is not possible.

RecordKeeper & getRecordKeeper() const

Get the record keeper that initialized this Init.

static const IntRecTy * get(RecordKeeper &RK)

This class represents a field in a record, including its name, type, value, and source location.

SMLoc getLoc() const

Get the source location of the point where the field was defined.

ArrayRef< SMLoc > getLoc() const

Represents a location in source code.

static SMLoc getFromPointer(const char *Ptr)

This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.

StringRef - Represent a constant reference to a string, i.e.

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

static LLVM_ABI raw_ostream & warning()

Convenience method for printing "warning: " to stderr.

static LLVM_ABI raw_ostream & error()

Convenience method for printing "error: " to stderr.

static LLVM_ABI raw_ostream & note()

Convenience method for printing "note: " to stderr.

An efficient, type-erasing, non-owning reference to a callable.

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

LLVM_ABI void RunInterruptHandlers()

This function runs all the registered interrupt handlers, including the removal of files registered b...

This is an optimization pass for GlobalISel generic memory operations.

unsigned ErrorsPrinted

Definition Error.cpp:25

decltype(auto) dyn_cast(const From &Val)

dyn_cast - Return the argument parameter cast to the specified type.

void PrintFatalError(const Twine &Msg)

Definition Error.cpp:132

void PrintError(const Twine &Msg)

Definition Error.cpp:104

bool CheckAssert(SMLoc Loc, const Init *Condition, const Init *Message)

Definition Error.cpp:163

SourceMgr SrcMgr

Definition Error.cpp:24

auto dyn_cast_or_null(const Y &Val)

void PrintWarning(const Twine &Msg)

Definition Error.cpp:90

void PrintNote(const Twine &Msg)

Definition Error.cpp:52

void PrintFatalNote(const Twine &Msg)

Definition Error.cpp:64

void dumpMessage(SMLoc Loc, const Init *Message)

Definition Error.cpp:181