Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
include/llvm/Analysis/MemoryBuiltins.h
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | |||||
bool isMallocOrCallocLikeFn(const Value *V, const TargetLibraryInfo *TLI, | bool isMallocOrCallocLikeFn(const Value *V, const TargetLibraryInfo *TLI, | ||||
bool LookThroughBitCast = false); | bool LookThroughBitCast = false); | ||||
/// Tests if a value is a call or invoke to a library function that | /// Tests if a value is a call or invoke to a library function that | ||||
/// allocates memory (either malloc, calloc, or strdup like). | /// allocates memory (either malloc, calloc, or strdup like). | ||||
bool isAllocLikeFn(const Value *V, const TargetLibraryInfo *TLI, | bool isAllocLikeFn(const Value *V, const TargetLibraryInfo *TLI, | ||||
bool LookThroughBitCast = false); | bool LookThroughBitCast = false); | ||||
/// Tests if a value is a call or invoke to a library function that | |||||
/// reallocates memory (e.g., realloc). | |||||
bool isReallocLikeFn(const Value *V, const TargetLibraryInfo *TLI, | |||||
bool LookThroughBitCast = false); | |||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// malloc Call Utility Functions. | // malloc Call Utility Functions. | ||||
// | // | ||||
/// extractMallocCall - Returns the corresponding CallInst if the instruction | /// extractMallocCall - Returns the corresponding CallInst if the instruction | ||||
/// is a malloc call. Since CallInst::CreateMalloc() only creates calls, we | /// is a malloc call. Since CallInst::CreateMalloc() only creates calls, we | ||||
/// ignore InvokeInst here. | /// ignore InvokeInst here. | ||||
const CallInst *extractMallocCall(const Value *I, const TargetLibraryInfo *TLI); | const CallInst *extractMallocCall(const Value *I, const TargetLibraryInfo *TLI); | ||||
▲ Show 20 Lines • Show All 219 Lines • Show Last 20 Lines |