mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-14 15:25:25 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226069 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user