clean up handling of 'free', detangling it from everything else.

It can be seriously improved, but at least now it isn't intertwined
with the other logic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120377 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-11-30 01:28:33 +00:00
parent feea8fb6b4
commit 1ab4285b72
2 changed files with 26 additions and 22 deletions

View File

@@ -74,6 +74,10 @@ Value *getMallocArraySize(CallInst *CI, const TargetData *TD,
/// isFreeCall - Returns non-null if the value is a call to the builtin free()
const CallInst *isFreeCall(const Value *I);
static inline CallInst *isFreeCall(Value *I) {
return const_cast<CallInst*>(isFreeCall((const Value*)I));
}
} // End llvm namespace