LLVM: lib/MC/MCParser/MCAsmParserExtension.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

14

15using namespace llvm;

16

18

20

22 this->Parser = &Parser;

23}

24

25

26

30 if (getParser().parseIdentifier(From))

31 return TokError("expected identifier in directive");

32

34 return TokError("expected a comma");

36

39 if (getParser().parseIdentifier(To))

40 return TokError("expected identifier in directive");

41

43 return TokError("expected a comma");

45

48 return true;

49

51 return TokError("unexpected token in directive");

52

55

59 return false;

60}

61

65 return false;

68 if (getParser().parseIdentifier(UniqueStr))

69 return TokError("expected identifier");

70 if (UniqueStr != "unique")

71 return TokError("expected 'unique'");

73 return TokError("expected commma");

76 return true;

78 return TokError("unique id must be positive");

80 return TokError("unique id is too large");

81 return false;

82}

static bool isNot(const MachineRegisterInfo &MRI, const MachineInstr &MI)

SMLoc getLoc() const

Get the current source location.

virtual ~MCAsmParserExtension()

virtual void Initialize(MCAsmParser &Parser)

Initialize the extension for parsing using the given Parser.

Definition MCAsmParserExtension.cpp:21

bool maybeParseUniqueID(int64_t &UniqueID)

Definition MCAsmParserExtension.cpp:62

bool TokError(const Twine &Msg)

bool parseDirectiveCGProfile(StringRef, SMLoc)

parseDirectiveCGProfile ::= .cg_profile identifier, identifier,

Definition MCAsmParserExtension.cpp:27

MCStreamer & getStreamer()

MCAsmParser & getParser()

Generic assembler parser interface, for use by target specific assembly parsers.

LLVM_ABI MCSymbol * parseSymbol(const Twine &Name)

Variant of getOrCreateSymbol that handles backslash-escaped symbols.

virtual void emitCGProfileEntry(const MCSymbolRefExpr *From, const MCSymbolRefExpr *To, uint64_t Count)

static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx, SMLoc Loc=SMLoc())

MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...

Represents a location in source code.

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

This is an optimization pass for GlobalISel generic memory operations.

FunctionAddr VTableAddr Count

constexpr bool isUInt(uint64_t x)

Checks if an unsigned integer fits into the given bit width.