LLVM  10.0.0svn
WinCFGuard.h
Go to the documentation of this file.
1 //===-- WinCFGuard.h - Windows Control Flow Guard Handling ----*- C++ -*--===//
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 // This file contains support for writing windows exception info into asm files.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_WINCFGUARD_H
14 #define LLVM_LIB_CODEGEN_ASMPRINTER_WINCFGUARD_H
15 
17 #include "llvm/Support/Compiler.h"
18 
19 namespace llvm {
20 
22  /// Target of directive emission.
23  AsmPrinter *Asm;
24 
25 public:
27  ~WinCFGuard() override;
28 
29  void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {}
30 
31  /// Emit the Control Flow Guard function ID table
32  void endModule() override;
33 
34  /// Gather pre-function debug information.
35  /// Every beginFunction(MF) call should be followed by an endFunction(MF)
36  /// call.
37  void beginFunction(const MachineFunction *MF) override {}
38 
39  /// Gather post-function debug information.
40  /// Please note that some AsmPrinter implementations may not call
41  /// beginFunction at all.
42  void endFunction(const MachineFunction *MF) override {}
43 
44  /// Process beginning of an instruction.
45  void beginInstruction(const MachineInstr *MI) override {}
46 
47  /// Process end of an instruction.
48  void endInstruction() override {}
49 };
50 
51 } // namespace llvm
52 
53 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
void beginInstruction(const MachineInstr *MI) override
Process beginning of an instruction.
Definition: WinCFGuard.h:45
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:78
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
Definition: Compiler.h:124
void endFunction(const MachineFunction *MF) override
Gather post-function debug information.
Definition: WinCFGuard.h:42
void endInstruction() override
Process end of an instruction.
Definition: WinCFGuard.h:48
Representation of each machine instruction.
Definition: MachineInstr.h:64
uint32_t Size
Definition: Profile.cpp:46
void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override
For symbols that have a size designated (e.g.
Definition: WinCFGuard.h:29
IRTranslator LLVM IR MI
void beginFunction(const MachineFunction *MF) override
Gather pre-function debug information.
Definition: WinCFGuard.h:37