diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO/Attributor.cpp')
| -rw-r--r-- | llvm/lib/Transforms/IPO/Attributor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp index 5082aa26dba..29dc80ae591 100644 --- a/llvm/lib/Transforms/IPO/Attributor.cpp +++ b/llvm/lib/Transforms/IPO/Attributor.cpp @@ -4658,6 +4658,9 @@ bool Attributor::checkForAllCallSites( << Fn.getName() << " has non call site use " << *U.get() << " in " << *U.getUser() << "\n"); + // BlockAddress users are allowed. + if (isa<BlockAddress>(U.getUser())) + continue; return false; } @@ -5072,6 +5075,7 @@ ChangeStatus Attributor::run(Module &M) { STATS_TRACK(AAIsDead, Function); ToBeDeletedFunctions.insert(F); + F->deleteBody(); F->replaceAllUsesWith(UndefValue::get(F->getType())); F->eraseFromParent(); InternalFns[u] = nullptr; |

