LLVM: lib/CodeGen/AsmPrinter/ARMException.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

20using namespace llvm;

21

23

25

29}

30

34

37 "non-EH CFI not yet supported in prologue with EHABI lowering");

38

40 if (!hasEmittedCFISections) {

42 Asm->OutStreamer->emitCFISections(false, true, false);

43 hasEmittedCFISections = true;

44 }

45

46 shouldEmitCFI = true;

47 Asm->OutStreamer->emitCFIStartProc(false);

48 }

49}

50

52 if (shouldEmitCFI)

53 Asm->OutStreamer->emitCFIEndProc();

54}

55

56

57

61 const Function *Per = nullptr;

62 if (F.hasPersonalityFn())

64 bool forceEmitPersonality =

66 F.needsUnwindTableEntry();

67 bool shouldEmitPersonality = forceEmitPersonality ||

69 if (Asm->MF->getFunction().needsUnwindTableEntry() &&

70 !shouldEmitPersonality)

72 else if (shouldEmitPersonality) {

73

74 if (Per) {

77 }

78

79

81

82

84 }

85

88}

89

90void ARMException::emitTypeInfos(unsigned TTypeEncoding,

93 const std::vector<const GlobalValue *> &TypeInfos = MF->getTypeInfos();

94 const std::vector &FilterIds = MF->getFilterIds();

95

97

98 int Entry = 0;

99

100 if (VerboseAsm && !TypeInfos.empty()) {

101 Asm->OutStreamer->AddComment(">> Catch TypeInfos <<");

103 Entry = TypeInfos.size();

104 }

105

107 if (VerboseAsm)

110 }

111

112 Asm->OutStreamer->emitLabel(TTBaseLabel);

113

114

115 if (VerboseAsm && !FilterIds.empty()) {

116 Asm->OutStreamer->AddComment(">> Filter TypeInfos <<");

117 Asm->OutStreamer->addBlankLine();

119 }

120 for (std::vector::const_iterator

121 I = FilterIds.begin(), E = FilterIds.end(); I < E; ++I) {

123 if (VerboseAsm) {

126 Asm->OutStreamer->AddComment("FilterInfo " + Twine(Entry));

127 }

128

129 Asm->emitTTypeReference((TypeID == 0 ? nullptr : TypeInfos[TypeID - 1]),

130 TTypeEncoding);

131 }

132}

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")

static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")

ARMException(AsmPrinter *A)

Definition ARMException.cpp:22

void endFunction(const MachineFunction *) override

Gather and emit post-function exception information.

Definition ARMException.cpp:58

void markFunctionEnd() override

Definition ARMException.cpp:51

void beginFunction(const MachineFunction *MF) override

Gather pre-function exception information.

Definition ARMException.cpp:31

virtual void emitFnStart()

virtual void emitPersonality(const MCSymbol *Personality)

virtual void emitHandlerData()

virtual void emitCantUnwind()

This class is intended to be used as a driving class for all asm writers.

virtual void emitTTypeReference(const GlobalValue *GV, unsigned Encoding)

Emit reference to a ttype global with a specified encoding.

MachineFunction * MF

The current machine function.

std::unique_ptr< MCStreamer > OutStreamer

This is the MCStreamer object for the file we are generating.

@ Debug

Emit .debug_frame.

AsmPrinter * Asm

Target of directive emission.

MCSymbol * emitExceptionTable()

Emit landing pads and actions.

EHStreamer(AsmPrinter *A)

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

Target specific streamer interface.

const std::vector< unsigned > & getFilterIds() const

Return a reference to the typeids encoding filters used in the current function.

const std::vector< const GlobalValue * > & getTypeInfos() const

Return a reference to the C++ typeinfo for the current function.

Function & getFunction()

Return the LLVM function that this machine code represents.

const std::vector< LandingPadInfo > & getLandingPads() const

Return a reference to the landing pad info for the current function.

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

This is an optimization pass for GlobalISel generic memory operations.

decltype(auto) dyn_cast(const From &Val)

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

bool isNoOpWithoutInvoke(EHPersonality Pers)

Return true if this personality may be safely removed if there are no invoke instructions remaining i...

auto reverse(ContainerTy &&C)

LLVM_ABI EHPersonality classifyEHPersonality(const Value *Pers)

See if the given exception handling personality function is one that we understand.