1 //===-- WinCFGuard.h - Windows Control Flow Guard Handling ----*- C++ -*--===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains support for writing windows exception info into asm files.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_WINCFGUARD_H
15 #define LLVM_LIB_CODEGEN_ASMPRINTER_WINCFGUARD_H
17 #include "AsmPrinterHandler.h"
18 #include "llvm/Support/Compiler.h"
22 class LLVM_LIBRARY_VISIBILITY WinCFGuard : public AsmPrinterHandler {
23 /// Target of directive emission.
27 WinCFGuard(AsmPrinter *A);
28 ~WinCFGuard() override;
30 void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {}
32 /// Emit the Control Flow Guard function ID table
33 void endModule() override;
35 /// Gather pre-function debug information.
36 /// Every beginFunction(MF) call should be followed by an endFunction(MF)
38 void beginFunction(const MachineFunction *MF) override {}
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 {}
45 /// Process beginning of an instruction.
46 void beginInstruction(const MachineInstr *MI) override {}
48 /// Process end of an instruction.
49 void endInstruction() override {}