00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef LLVM_ANALYSIS_MEMORYBUILTINS_H
00016 #define LLVM_ANALYSIS_MEMORYBUILTINS_H
00017
00018 namespace llvm {
00019 class CallInst;
00020 class PointerType;
00021 class TargetData;
00022 class Type;
00023 class Value;
00024
00025
00026
00027
00028
00031 bool isMalloc(const Value *I);
00032
00036 const CallInst *extractMallocCall(const Value *I);
00037 CallInst *extractMallocCall(Value *I);
00038
00041 const CallInst *extractMallocCallFromBitCast(const Value *I);
00042 CallInst *extractMallocCallFromBitCast(Value *I);
00043
00047 const CallInst *isArrayMalloc(const Value *I, const TargetData *TD);
00048
00054 const PointerType *getMallocType(const CallInst *CI);
00055
00061 const Type *getMallocAllocatedType(const CallInst *CI);
00062
00068 Value *getMallocArraySize(CallInst *CI, const TargetData *TD,
00069 bool LookThroughSExt = false);
00070
00071
00072
00073
00074
00076 bool isFreeCall(const Value *I);
00077
00078 }
00079
00080 #endif