LLVM API Documentation

Public Types | Public Member Functions | Static Public Attributes
llvm::StackProtector Class Reference

#include <StackProtector.h>

Inheritance diagram for llvm::StackProtector:
Inheritance graph
[legend]
Collaboration diagram for llvm::StackProtector:
Collaboration graph
[legend]

List of all members.

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.

Public Member Functions

 StackProtector ()
 StackProtector (const TargetMachine *TM)
void getAnalysisUsage (AnalysisUsage &AU) const override
SSPLayoutKind getSSPLayout (const AllocaInst *AI) const
void adjustForColoring (const AllocaInst *From, const AllocaInst *To)
bool runOnFunction (Function &Fn) override

Static Public Attributes

static char ID = 0

Detailed Description

Definition at line 32 of file StackProtector.h.


Member Typedef Documentation

A mapping of AllocaInsts to their required SSP layout.

Definition at line 48 of file StackProtector.h.


Member Enumeration Documentation

SSPLayoutKind. Stack Smashing Protection (SSP) rules require that vulnerable stack allocations are located close the stack protector.

Enumerator:
SSPLK_None 

Did not trigger a stack protector. No effect on data layout.

SSPLK_LargeArray 

Array or nested array >= SSP-buffer-size. Closest to the stack protector.

SSPLK_SmallArray 

Array or nested array < SSP-buffer-size. 2nd closest to the stack protector.

SSPLK_AddrOf 

The address of this allocation is exposed and triggered protection. 3rd closest to the protector.

Definition at line 36 of file StackProtector.h.


Constructor & Destructor Documentation


Member Function Documentation

void llvm::StackProtector::getAnalysisUsage ( AnalysisUsage ) const [inline, override, virtual]

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 118 of file StackProtector.h.

References llvm::AnalysisUsage::addPreserved().

bool StackProtector::runOnFunction ( Function F) [override, virtual]

Member Data Documentation

char StackProtector::ID = 0 [static]

Definition at line 107 of file StackProtector.h.


The documentation for this class was generated from the following files: