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:
5ab09a6
)
[WebAssembly] Fix memory leak on WasmEHFuncInfo
author
Heejin Ahn
<aheejin@gmail.com>
Fri, 28 Sep 2018 20:54:04 +0000
(20:54 +0000)
committer
Heejin Ahn
<aheejin@gmail.com>
Fri, 28 Sep 2018 20:54:04 +0000
(20:54 +0000)
Summary: WasmEHFuncInfo objects were not being properly deleted.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D52582
llvm-svn: 343362
llvm/lib/CodeGen/MachineFunction.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/CodeGen/MachineFunction.cpp
b/llvm/lib/CodeGen/MachineFunction.cpp
index
ecf913f
..
8603a1e
100644
(file)
--- a/
llvm/lib/CodeGen/MachineFunction.cpp
+++ b/
llvm/lib/CodeGen/MachineFunction.cpp
@@
-246,6
+246,11
@@
void MachineFunction::clear() {
WinEHInfo->~WinEHFuncInfo();
Allocator.Deallocate(WinEHInfo);
}
+
+ if (WasmEHInfo) {
+ WasmEHInfo->~WasmEHFuncInfo();
+ Allocator.Deallocate(WasmEHInfo);
+ }
}
const DataLayout &MachineFunction::getDataLayout() const {