aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/MallocHelper.cpp
diff options
context:
space:
mode:
authorVictor Hernandez <vhernandez@apple.com>2009-10-26 23:43:48 +0000
committerVictor Hernandez <vhernandez@apple.com>2009-10-26 23:43:48 +0000
commit046e78ce55a7c3d82b7b6758d2d77f2d99f970bf (patch)
tree1dad2445d3c6c08dc6d901e27806df980a7f855a /lib/Analysis/MallocHelper.cpp
parentdda9583e5194c08ddd409f3e1c211e17acd6d5b8 (diff)
Remove FreeInst.
Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85176 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/MallocHelper.cpp')
-rw-r--r--lib/Analysis/MallocHelper.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Analysis/MallocHelper.cpp b/lib/Analysis/MallocHelper.cpp
index 511de9d6a5..70afa88ac6 100644
--- a/lib/Analysis/MallocHelper.cpp
+++ b/lib/Analysis/MallocHelper.cpp
@@ -1,4 +1,4 @@
-//===-- MallocHelper.cpp - Functions to identify malloc calls -------------===//
+//===-- MallocFreeHelper.cpp - Identify calls to malloc and free builtins -===//
//
// The LLVM Compiler Infrastructure
//
@@ -8,7 +8,8 @@
//===----------------------------------------------------------------------===//
//
// This family of functions identifies calls to malloc, bitcasts of malloc
-// calls, and the types and array sizes associated with them.
+// calls, and the types and array sizes associated with them. It also
+// identifies calls to the free builtin.
//
//===----------------------------------------------------------------------===//
@@ -264,6 +265,10 @@ Value* llvm::getMallocArraySize(CallInst* CI, LLVMContext &Context,
return BO->getOperand(0);
}
+//===----------------------------------------------------------------------===//
+// free Call Utility Functions.
+//
+
/// isFreeCall - Returns true if the the value is a call to the builtin free()
bool llvm::isFreeCall(const Value* I) {
const CallInst *CI = dyn_cast<CallInst>(I);