klee
klee::FunctionAliasPass Class Reference

#include <Passes.h>

Inherits llvm::ModulePass.

Public Member Functions

 FunctionAliasPass ()
 
bool runOnModule (llvm::Module &M) override
 

Static Public Attributes

static char ID = 0
 

Static Private Member Functions

static const llvm::FunctionType * getFunctionType (const llvm::GlobalValue *gv)
 
static bool checkType (const llvm::GlobalValue *match, const llvm::GlobalValue *replacement)
 
static bool tryToReplace (llvm::GlobalValue *match, llvm::GlobalValue *replacement)
 
static bool isFunctionOrGlobalFunctionAlias (const llvm::GlobalValue *gv)
 

Detailed Description

FunctionAliasPass - Enables a user of KLEE to specify aliases to functions using -function-alias=<name|pattern>:<replacement> which are injected as GlobalAliases into the module. The replaced function is removed.

Definition at line 173 of file Passes.h.

Constructor & Destructor Documentation

◆ FunctionAliasPass()

klee::FunctionAliasPass::FunctionAliasPass ( )
inline

Definition at line 177 of file Passes.h.

Member Function Documentation

◆ checkType()

bool klee::FunctionAliasPass::checkType ( const llvm::GlobalValue *  match,
const llvm::GlobalValue *  replacement 
)
staticprivate

Definition at line 145 of file FunctionAlias.cpp.

References getFunctionType(), and klee::klee_warning().

Referenced by tryToReplace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFunctionType()

const FunctionType * klee::FunctionAliasPass::getFunctionType ( const llvm::GlobalValue *  gv)
staticprivate

Definition at line 136 of file FunctionAlias.cpp.

Referenced by checkType().

Here is the caller graph for this function:

◆ isFunctionOrGlobalFunctionAlias()

bool klee::FunctionAliasPass::isFunctionOrGlobalFunctionAlias ( const llvm::GlobalValue *  gv)
staticprivate

Definition at line 201 of file FunctionAlias.cpp.

References isFunctionOrGlobalFunctionAlias().

Referenced by isFunctionOrGlobalFunctionAlias(), and runOnModule().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ runOnModule()

bool klee::FunctionAliasPass::runOnModule ( llvm::Module &  M)
override

Definition at line 36 of file FunctionAlias.cpp.

References isFunctionOrGlobalFunctionAlias(), klee::klee_error(), klee::klee_message(), klee::klee_warning(), and tryToReplace().

Here is the call graph for this function:

◆ tryToReplace()

bool klee::FunctionAliasPass::tryToReplace ( llvm::GlobalValue *  match,
llvm::GlobalValue *  replacement 
)
staticprivate

Definition at line 188 of file FunctionAlias.cpp.

References checkType().

Referenced by runOnModule().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ID

char klee::FunctionAliasPass::ID = 0
static

Definition at line 176 of file Passes.h.


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