diff options
author | Chris Lattner <sabre@nondot.org> | 2010-11-30 01:28:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-11-30 01:28:33 +0000 |
commit | 1ab4285b721a412692e96a493ef4f2b9223902f9 (patch) | |
tree | a6607b0a75e9da1546ed16bf0b311de27e693692 /include/llvm/Analysis | |
parent | feea8fb6b41bab0a135bf9966d68a05665c32899 (diff) | |
download | external_llvm-1ab4285b721a412692e96a493ef4f2b9223902f9.zip external_llvm-1ab4285b721a412692e96a493ef4f2b9223902f9.tar.gz external_llvm-1ab4285b721a412692e96a493ef4f2b9223902f9.tar.bz2 |
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
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/MemoryBuiltins.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Analysis/MemoryBuiltins.h b/include/llvm/Analysis/MemoryBuiltins.h index a4f9162..22493f6 100644 --- a/include/llvm/Analysis/MemoryBuiltins.h +++ b/include/llvm/Analysis/MemoryBuiltins.h @@ -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 |