[llvm] r343362 - [WebAssembly] Fix memory leak on WasmEHFuncInfo
Heejin Ahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 28 13:54:04 PDT 2018
Author: aheejin
Date: Fri Sep 28 13:54:04 2018
New Revision: 343362
URL: http://llvm.org/viewvc/llvm-project?rev=343362&view=rev
Log:
[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
Modified:
llvm/trunk/lib/CodeGen/MachineFunction.cpp
Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=343362&r1=343361&r2=343362&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Fri Sep 28 13:54:04 2018
@@ -246,6 +246,11 @@ void MachineFunction::clear() {
WinEHInfo->~WinEHFuncInfo();
Allocator.Deallocate(WinEHInfo);
}
+
+ if (WasmEHInfo) {
+ WasmEHInfo->~WasmEHFuncInfo();
+ Allocator.Deallocate(WasmEHInfo);
+ }
}
const DataLayout &MachineFunction::getDataLayout() const {
More information about the llvm-commits
mailing list