Fix memory leak

llvm-svn: 303126
This commit is contained in:
Xinliang David Li 2017-05-15 22:43:52 +00:00
parent 87813b1bf8
commit 8726d91d29
1 changed files with 4 additions and 0 deletions

View File

@ -591,6 +591,10 @@ void PartialInlinerImpl::computeCallsiteToProfCountMap(
else
CallSiteToProfCountMap[User] = 0;
}
if (!GetBFI) {
if (CurrentCallerBFI)
delete CurrentCallerBFI;
}
}
Function *PartialInlinerImpl::unswitchFunction(Function *F) {