From 252ef566e8734b6bcf46434d0a7954c9eda0bd96 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Thu, 3 May 2012 21:19:58 +0000 Subject: add support for calloc to objectsize lowering git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156102 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/MemoryBuiltins.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/llvm/Analysis/MemoryBuiltins.h') diff --git a/include/llvm/Analysis/MemoryBuiltins.h b/include/llvm/Analysis/MemoryBuiltins.h index 865d236f6f..e7dcbf3cfc 100644 --- a/include/llvm/Analysis/MemoryBuiltins.h +++ b/include/llvm/Analysis/MemoryBuiltins.h @@ -68,6 +68,17 @@ Type *getMallocAllocatedType(const CallInst *CI); Value *getMallocArraySize(CallInst *CI, const TargetData *TD, bool LookThroughSExt = false); + +//===----------------------------------------------------------------------===// +// calloc Call Utility Functions. +// + +/// extractCallocCall - Returns the corresponding CallInst if the instruction +/// is a calloc call. +const CallInst *extractCallocCall(const Value *I); +CallInst *extractCallocCall(Value *I); + + //===----------------------------------------------------------------------===// // free Call Utility Functions. // -- cgit v1.2.3