LLVM API Documentation
#include <StackProtector.h>
Public Types | |
enum | SSPLayoutKind { SSPLK_None, SSPLK_LargeArray, SSPLK_SmallArray, SSPLK_AddrOf } |
typedef ValueMap< const AllocaInst *, SSPLayoutKind > | SSPLayoutMap |
A mapping of AllocaInsts to their required SSP layout. More... | |
Public Member Functions | |
StackProtector () | |
StackProtector (const TargetMachine *TM) | |
virtual void | getAnalysisUsage (AnalysisUsage &AU) const |
SSPLayoutKind | getSSPLayout (const AllocaInst *AI) const |
virtual bool | runOnFunction (Function &Fn) |
![]() | |
FunctionPass (char &pid) | |
Pass * | createPrinterPass (raw_ostream &O, const std::string &Banner) const |
createPrinterPass - Get a function printer pass. More... | |
virtual void | assignPassManager (PMStack &PMS, PassManagerType T) |
virtual PassManagerType | getPotentialPassManagerType () const |
Return what kind of Pass Manager can manage this pass. More... | |
![]() | |
Pass (PassKind K, char &pid) | |
virtual | ~Pass () |
PassKind | getPassKind () const |
virtual const char * | getPassName () const |
AnalysisID | getPassID () const |
getPassID - Return the PassID number that corresponds to this pass. More... | |
virtual bool | doInitialization (Module &) |
virtual bool | doFinalization (Module &) |
virtual void | print (raw_ostream &O, const Module *M) const |
void | dump () const |
virtual void | preparePassManager (PMStack &) |
Check if available pass managers are suitable for this pass or not. More... | |
void | setResolver (AnalysisResolver *AR) |
AnalysisResolver * | getResolver () const |
virtual void | releaseMemory () |
virtual void * | getAdjustedAnalysisPointer (AnalysisID ID) |
virtual ImmutablePass * | getAsImmutablePass () |
virtual PMDataManager * | getAsPMDataManager () |
virtual void | verifyAnalysis () const |
virtual void | dumpPassStructure (unsigned Offset=0) |
template<typename AnalysisType > | |
AnalysisType * | getAnalysisIfAvailable () const |
bool | mustPreserveAnalysisID (char &AID) const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysis () const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysis (Function &F) |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI) const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI, Function &F) |
Static Public Attributes | |
static char | ID = 0 |
Additional Inherited Members | |
![]() | |
static const PassInfo * | lookupPassInfo (const void *TI) |
static const PassInfo * | lookupPassInfo (StringRef Arg) |
static Pass * | createPass (AnalysisID ID) |
Definition at line 32 of file StackProtector.h.
typedef ValueMap<const AllocaInst *, SSPLayoutKind> llvm::StackProtector::SSPLayoutMap |
A mapping of AllocaInsts to their required SSP layout.
Definition at line 48 of file StackProtector.h.
SSPLayoutKind. Stack Smashing Protection (SSP) rules require that vulnerable stack allocations are located close the stack protector.
Definition at line 36 of file StackProtector.h.
|
inline |
Definition at line 108 of file StackProtector.h.
References llvm::PassRegistry::getPassRegistry(), and llvm::initializeStackProtectorPass().
|
inline |
Definition at line 111 of file StackProtector.h.
References llvm::PassRegistry::getPassRegistry(), and llvm::initializeStackProtectorPass().
|
inlinevirtual |
getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. If a pass specifies that it uses a particular analysis result to this function, it can then use the getAnalysis<AnalysisType>() function, below.
Reimplemented from llvm::Pass.
Definition at line 117 of file StackProtector.h.
References llvm::AnalysisUsage::addPreserved().
StackProtector::SSPLayoutKind StackProtector::getSSPLayout | ( | const AllocaInst * | AI | ) | const |
Definition at line 57 of file StackProtector.cpp.
References llvm::ValueMap< KeyT, ValueT, Config >::lookup(), and SSPLK_None.
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
Implements llvm::FunctionPass.
Definition at line 61 of file StackProtector.cpp.
References llvm::StringRef::getAsInteger(), llvm::AttributeSet::getAttribute(), llvm::Function::getAttributes(), llvm::GlobalValue::getParent(), llvm::TargetMachine::getTargetLowering(), llvm::Attribute::getValueAsString(), and llvm::Attribute::isStringAttribute().
|
static |
Definition at line 107 of file StackProtector.h.