mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Fix test failure on windows -- do not return deleted func
llvm-svn: 302999
This commit is contained in:
parent
30b209f262
commit
a4047145f7
@ -715,9 +715,15 @@ Function *PartialInlinerImpl::unswitchFunction(Function *F) {
|
||||
// users (function pointers, etc.) back to the original function.
|
||||
DuplicateFunction->replaceAllUsesWith(F);
|
||||
DuplicateFunction->eraseFromParent();
|
||||
if (!AnyInline && OutlinedFunction)
|
||||
|
||||
if (AnyInline)
|
||||
return OutlinedFunction;
|
||||
|
||||
// Remove the function that is speculatively created:
|
||||
if (OutlinedFunction)
|
||||
OutlinedFunction->eraseFromParent();
|
||||
return OutlinedFunction;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool PartialInlinerImpl::tryPartialInline(Function *DuplicateFunction,
|
||||
|
Loading…
Reference in New Issue
Block a user