LLVM
22.0.0git
include
llvm
DWARFCFIChecker
DWARFCFIFunctionFrameAnalyzer.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 CFIFunctionFrameAnalyzer class.
11
///
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_DWARFCFICHECKER_DWARFCFIFUNCTIONFRAMEANALYZER_H
15
#define LLVM_DWARFCFICHECKER_DWARFCFIFUNCTIONFRAMEANALYZER_H
16
17
#include "
DWARFCFIAnalysis.h
"
18
#include "
DWARFCFIFunctionFrameReceiver.h
"
19
#include "
llvm/ADT/ArrayRef.h
"
20
#include "
llvm/ADT/SmallVector.h
"
21
#include "
llvm/Support/Compiler.h
"
22
23
namespace
llvm
{
24
25
/// This class implements the `CFIFunctionFrameReceiver` interface to validate
26
/// Call Frame Information in a stream of function frames. For validation, it
27
/// instantiates a `DWARFCFIAnalysis` for each frame. The errors/warnings are
28
/// emitted through the `MCContext` instance to the constructor. If a frame
29
/// finishes without being started or if all the frames are not finished before
30
/// this classes is destructed, the program fails through an assertion.
31
class
LLVM_ABI
CFIFunctionFrameAnalyzer
:
public
CFIFunctionFrameReceiver
{
32
public
:
33
CFIFunctionFrameAnalyzer
(
MCContext
&Context,
const
MCInstrInfo
&MCII)
34
:
CFIFunctionFrameReceiver
(Context), MCII(MCII) {}
35
~CFIFunctionFrameAnalyzer
();
36
37
void
startFunctionFrame(
bool
IsEH,
38
ArrayRef<MCCFIInstruction>
Prologue)
override
;
39
void
40
emitInstructionAndDirectives(
const
MCInst
&Inst,
41
ArrayRef<MCCFIInstruction>
Directives)
override
;
42
void
finishFunctionFrame()
override
;
43
44
private
:
45
MCInstrInfo
const
&MCII;
46
SmallVector<DWARFCFIAnalysis>
UIAs;
47
};
48
49
}
// namespace llvm
50
51
#endif
ArrayRef.h
Compiler.h
LLVM_ABI
#define LLVM_ABI
Definition
Compiler.h:213
DWARFCFIAnalysis.h
This file declares DWARFCFIAnalysis class.
DWARFCFIFunctionFrameReceiver.h
This file declares CFIFunctionFrameReceiver class.
SmallVector.h
This file defines the SmallVector class.
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition
ArrayRef.h:41
llvm::CFIFunctionFrameAnalyzer
This class implements the CFIFunctionFrameReceiver interface to validate Call Frame Information in a ...
Definition
DWARFCFIFunctionFrameAnalyzer.h:31
llvm::CFIFunctionFrameAnalyzer::CFIFunctionFrameAnalyzer
CFIFunctionFrameAnalyzer(MCContext &Context, const MCInstrInfo &MCII)
Definition
DWARFCFIFunctionFrameAnalyzer.h:33
llvm::CFIFunctionFrameReceiver::CFIFunctionFrameReceiver
CFIFunctionFrameReceiver(const CFIFunctionFrameReceiver &)=delete
llvm::MCContext
Context object for machine code objects.
Definition
MCContext.h:83
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition
MCInst.h:188
llvm::MCInstrInfo
Interface to description of machine instruction set.
Definition
MCInstrInfo.h:27
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition
SmallVector.h:1199
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
Generated on
for LLVM by
1.14.0