aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2018-09-28 20:54:04 +0000
committerHeejin Ahn <aheejin@gmail.com>2018-09-28 20:54:04 +0000
commitec3d65b870c31a80932c5a2c510cbd21e0122564 (patch)
tree053744e9a1e48d4dc1cfb748a233b2838e558886 /llvm/lib/CodeGen/MachineFunction.cpp
parent5ab09a684fd8759bac3cc824bb4550b0e5d7f4b8 (diff)
downloadllvm-ec3d65b870c31a80932c5a2c510cbd21e0122564.zip
llvm-ec3d65b870c31a80932c5a2c510cbd21e0122564.tar.gz
llvm-ec3d65b870c31a80932c5a2c510cbd21e0122564.tar.bz2
[WebAssembly] Fix memory leak on WasmEHFuncInfo
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index ecf913f..8603a1e 100644
--- 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 {