diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-01-15 01:00:33 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-01-15 01:00:33 +0000 |
commit | e78bb1249e124ce194b471c13248fd7038a3b4ca (patch) | |
tree | f7d9285e6e47f917436f3381d4a83086e27b1583 /llvm/lib/Analysis/MemoryBuiltins.cpp | |
parent | a487aa4cdbd37b9d6f53532971415bb1f5c45b23 (diff) | |
download | bcm5719-llvm-e78bb1249e124ce194b471c13248fd7038a3b4ca.tar.gz bcm5719-llvm-e78bb1249e124ce194b471c13248fd7038a3b4ca.zip |
For PR21145: recognise a builtin call to a known deallocation function even if
it's defined in the current module. Clang generates this situation for the
C++14 sized deallocation functions, because it generates a weak definition in
case one isn't provided by the C++ runtime library.
llvm-svn: 226069
Diffstat (limited to 'llvm/lib/Analysis/MemoryBuiltins.cpp')
-rw-r--r-- | llvm/lib/Analysis/MemoryBuiltins.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/MemoryBuiltins.cpp b/llvm/lib/Analysis/MemoryBuiltins.cpp index 08b41fee445..233cdab2e59 100644 --- a/llvm/lib/Analysis/MemoryBuiltins.cpp +++ b/llvm/lib/Analysis/MemoryBuiltins.cpp @@ -319,7 +319,7 @@ const CallInst *llvm::isFreeCall(const Value *I, const TargetLibraryInfo *TLI) { if (!CI || isa<IntrinsicInst>(CI)) return nullptr; Function *Callee = CI->getCalledFunction(); - if (Callee == nullptr || !Callee->isDeclaration()) + if (Callee == nullptr) return nullptr; StringRef FnName = Callee->getName(); |