LLVM  8.0.1
WinCFGuard.h
Go to the documentation of this file.
1 //===-- WinCFGuard.h - Windows Control Flow Guard Handling ----*- C++ -*--===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains support for writing windows exception info into asm files.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_WINCFGUARD_H
15 #define LLVM_LIB_CODEGEN_ASMPRINTER_WINCFGUARD_H
16 
18 #include "llvm/Support/Compiler.h"
19 
20 namespace llvm {
21 
23  /// Target of directive emission.
24  AsmPrinter *Asm;
25 
26 public:
28  ~WinCFGuard() override;
29 
30  void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {}
31 
32  /// Emit the Control Flow Guard function ID table
33  void endModule() override;
34 
35  /// Gather pre-function debug information.
36  /// Every beginFunction(MF) call should be followed by an endFunction(MF)
37  /// call.
38  void beginFunction(const MachineFunction *MF) override {}
39 
40  /// Gather post-function debug information.
41  /// Please note that some AsmPrinter implementations may not call
42  /// beginFunction at all.
43  void endFunction(const MachineFunction *MF) override {}
44 
45  /// Process beginning of an instruction.
46  void beginInstruction(const MachineInstr *MI) override {}
47 
48  /// Process end of an instruction.
49  void endInstruction() override {}
50 };
51 
52 } // namespace llvm
53 
54 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:24
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:42
void beginInstruction(const MachineInstr *MI) override
Process beginning of an instruction.
Definition: WinCFGuard.h:46
Collects and handles AsmPrinter objects required to build debug or EH information.
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:79
void endFunction(const MachineFunction *MF) override
Gather post-function debug information.
Definition: WinCFGuard.h:43
void endInstruction() override
Process end of an instruction.
Definition: WinCFGuard.h:49
Representation of each machine instruction.
Definition: MachineInstr.h:64
uint32_t Size
Definition: Profile.cpp:47
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
Definition: Compiler.h:108
void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override
For symbols that have a size designated (e.g.
Definition: WinCFGuard.h:30
IRTranslator LLVM IR MI
void beginFunction(const MachineFunction *MF) override
Gather pre-function debug information.
Definition: WinCFGuard.h:38