projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87feb4e
)
Fix a memory leak.
author
Easwaran Raman
<eraman@google.com>
Fri, 4 Mar 2016 01:18:40 +0000
(
01:18
+0000)
committer
Easwaran Raman
<eraman@google.com>
Fri, 4 Mar 2016 01:18:40 +0000
(
01:18
+0000)
llvm-svn: 262682
llvm/lib/Analysis/InlineCost.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Analysis/InlineCost.cpp
b/llvm/lib/Analysis/InlineCost.cpp
index
4f69d1f
..
355c326
100644
(file)
--- a/
llvm/lib/Analysis/InlineCost.cpp
+++ b/
llvm/lib/Analysis/InlineCost.cpp
@@
-1600,5
+1600,8
@@
BlockFrequencyInfo *BlockFrequencyAnalysis::getBlockFrequencyInfo(Function *F) {
/// \brief Invalidate BlockFrequencyInfo for a function.
void BlockFrequencyAnalysis::invalidateBlockFrequencyInfo(Function *F) {
- BFM.erase(F);
+ if (BFM.count(F)) {
+ delete BFM[F];
+ BFM.erase(F);
+ }
}