//===- StackProtector.h - Stack Protector Insertion -------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This pass inserts stack protectors into functions which need them. A variable // with a random value in it is stored onto the stack before the local variables // are allocated. Upon exiting the block, the stored value is checked. If it's // changed, then there was some sort of violation and the program aborts. // //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_STACKPROTECTOR_H #define LLVM_CODEGEN_STACKPROTECTOR_H #include "llvm/Analysis/DomTreeUpdater.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/PassManager.h" #include "llvm/Pass.h" #include "llvm/TargetParser/Triple.h" namespace llvm { class BasicBlock; class Function; class Module; class TargetLoweringBase; class TargetMachine; class SSPLayoutInfo { … }; class SSPLayoutAnalysis : public AnalysisInfoMixin<SSPLayoutAnalysis> { … }; class StackProtectorPass : public PassInfoMixin<StackProtectorPass> { … }; class StackProtector : public FunctionPass { … }; } // end namespace llvm #endif // LLVM_CODEGEN_STACKPROTECTOR_H