LLVM 22.0.0git
DWARFCFIFunctionFrameReceiver.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8///
9/// \file
10/// This file declares CFIFunctionFrameReceiver class.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_DWARFCFICHECKER_DWARFCFIFUNCTIONFRAMERECEIVER_H
15#define LLVM_DWARFCFICHECKER_DWARFCFIFUNCTIONFRAMERECEIVER_H
16
17#include "llvm/ADT/ArrayRef.h"
18
19namespace llvm {
20
22class MCContext;
23class MCInst;
24
25/// This abstract base class is an interface for receiving DWARF function frames
26/// Call Frame Information. `DWARFCFIFunctionFrameStreamer` channels the
27/// function frames information gathered from an `MCStreamer` using a pointer to
28/// an instance of this class for the whole program.
30public:
34 virtual ~CFIFunctionFrameReceiver() = default;
35
36 CFIFunctionFrameReceiver(MCContext &Context) : Context(Context) {}
37
38 MCContext &getContext() const { return Context; }
39
40 virtual void startFunctionFrame(bool IsEH,
42 /// Instructions are processed in the program order.
43 virtual void
46 virtual void finishFunctionFrame() {}
47
48private:
49 MCContext &Context;
50};
51
52} // namespace llvm
53
54#endif
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:41
CFIFunctionFrameReceiver(const CFIFunctionFrameReceiver &)=delete
virtual void emitInstructionAndDirectives(const MCInst &Inst, ArrayRef< MCCFIInstruction > Directives)
Instructions are processed in the program order.
CFIFunctionFrameReceiver & operator=(const CFIFunctionFrameReceiver &)=delete
virtual void startFunctionFrame(bool IsEH, ArrayRef< MCCFIInstruction > Prologue)
virtual ~CFIFunctionFrameReceiver()=default
Context object for machine code objects.
Definition MCContext.h:83
Instances of this class represent a single low-level machine instruction.
Definition MCInst.h:188
This is an optimization pass for GlobalISel generic memory operations.