LLVM API Documentation
#include <BuildLibCalls.h>
Public Member Functions | |
virtual | ~SimplifyFortifiedLibCalls () |
bool | fold (CallInst *CI, const DataLayout *TD, const TargetLibraryInfo *TLI) |
Protected Member Functions | |
virtual void | replaceCall (Value *With)=0 |
virtual bool | isFoldable (unsigned SizeCIOp, unsigned SizeArgOp, bool isString) const =0 |
Protected Attributes | |
CallInst * | CI |
SimplifyFortifiedLibCalls - Helper class for folding checked library calls (e.g. __strcpy_chk) into their unchecked counterparts.
Definition at line 121 of file BuildLibCalls.h.
SimplifyFortifiedLibCalls::~SimplifyFortifiedLibCalls | ( | ) | [virtual] |
Definition at line 490 of file BuildLibCalls.cpp.
bool SimplifyFortifiedLibCalls::fold | ( | CallInst * | CI, |
const DataLayout * | TD, | ||
const TargetLibraryInfo * | TLI | ||
) |
Definition at line 492 of file BuildLibCalls.cpp.
References CI, llvm::IRBuilder< preserveNames, T, Inserter >::CreateIntCast(), llvm::IRBuilderBase::CreateMemCpy(), llvm::IRBuilderBase::CreateMemMove(), llvm::IRBuilderBase::CreateMemSet(), llvm::EmitStrCpy(), llvm::EmitStrNCpy(), llvm::CallInst::getArgOperand(), llvm::CallInst::getCalledFunction(), llvm::BasicBlock::getContext(), llvm::Function::getFunctionType(), llvm::Type::getInt8PtrTy(), llvm::IRBuilderBase::getInt8Ty(), llvm::DataLayout::getIntPtrType(), llvm::Value::getName(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), llvm::Instruction::getParent(), llvm::FunctionType::getReturnType(), isFoldable(), llvm::Type::isIntegerTy(), llvm::Type::isPointerTy(), Name, replaceCall(), llvm::MipsISD::Ret, and llvm::StringRef::substr().
virtual bool llvm::SimplifyFortifiedLibCalls::isFoldable | ( | unsigned | SizeCIOp, |
unsigned | SizeArgOp, | ||
bool | isString | ||
) | const [protected, pure virtual] |
Referenced by fold().
virtual void llvm::SimplifyFortifiedLibCalls::replaceCall | ( | Value * | With | ) | [protected, pure virtual] |
Referenced by fold().
CallInst* llvm::SimplifyFortifiedLibCalls::CI [protected] |
Definition at line 123 of file BuildLibCalls.h.
Referenced by fold().