diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO/MergeFunctions.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/MergeFunctions.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp index 30fe9bbbe61..11efe95b10d 100644 --- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp +++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp @@ -845,7 +845,7 @@ void MergeFunctions::mergeTwoFunctions(Function *F, Function *G) { // If G was internal then we may have replaced all uses of G with F. If so, // stop here and delete G. There's no need for a thunk. (See note on // MergeFunctionsPDI above). - if (G->hasLocalLinkage() && G->use_empty() && !MergeFunctionsPDI) { + if (G->isDiscardableIfUnused() && G->use_empty() && !MergeFunctionsPDI) { G->eraseFromParent(); ++NumFunctionsMerged; return; |