1*81ad6265SDimitry Andric //===-- CFIFixup.h - Insert CFI remember/restore instructions ---*- C++ -*-===// 2*81ad6265SDimitry Andric // 3*81ad6265SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*81ad6265SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*81ad6265SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*81ad6265SDimitry Andric // 7*81ad6265SDimitry Andric //===----------------------------------------------------------------------===// 8*81ad6265SDimitry Andric /// 9*81ad6265SDimitry Andric /// \file 10*81ad6265SDimitry Andric /// Contains definition of the base CFIFixup pass. 11*81ad6265SDimitry Andric /// 12*81ad6265SDimitry Andric //===----------------------------------------------------------------------===// 13*81ad6265SDimitry Andric 14*81ad6265SDimitry Andric #ifndef LLVM_CODEGEN_CFIFIXUP_H 15*81ad6265SDimitry Andric #define LLVM_CODEGEN_CFIFIXUP_H 16*81ad6265SDimitry Andric 17*81ad6265SDimitry Andric #include "llvm/CodeGen/MachineFunctionPass.h" 18*81ad6265SDimitry Andric #include "llvm/InitializePasses.h" 19*81ad6265SDimitry Andric 20*81ad6265SDimitry Andric namespace llvm { 21*81ad6265SDimitry Andric class CFIFixup : public MachineFunctionPass { 22*81ad6265SDimitry Andric public: 23*81ad6265SDimitry Andric static char ID; 24*81ad6265SDimitry Andric CFIFixup()25*81ad6265SDimitry Andric CFIFixup() : MachineFunctionPass(ID) { 26*81ad6265SDimitry Andric initializeCFIFixupPass(*PassRegistry::getPassRegistry()); 27*81ad6265SDimitry Andric } 28*81ad6265SDimitry Andric getAnalysisUsage(AnalysisUsage & AU)29*81ad6265SDimitry Andric void getAnalysisUsage(AnalysisUsage &AU) const override { 30*81ad6265SDimitry Andric AU.setPreservesAll(); 31*81ad6265SDimitry Andric MachineFunctionPass::getAnalysisUsage(AU); 32*81ad6265SDimitry Andric } 33*81ad6265SDimitry Andric 34*81ad6265SDimitry Andric bool runOnMachineFunction(MachineFunction &MF) override; 35*81ad6265SDimitry Andric }; 36*81ad6265SDimitry Andric } // namespace llvm 37*81ad6265SDimitry Andric 38*81ad6265SDimitry Andric #endif // LLVM_CODEGEN_CFIFIXUP_H 39