From: Yaron Keren Date: Thu, 6 Aug 2015 07:28:36 +0000 (+0000) Subject: Plug a memory leak in NeonEmitter: Intrinsics allocated were never released. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f02202b208907e8a5015a19f0bb1c6bcea8ba25f;p=clang Plug a memory leak in NeonEmitter: Intrinsics allocated were never released. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244196 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/NeonEmitter.cpp b/utils/TableGen/NeonEmitter.cpp index 7644ae2c04..c3a387e606 100644 --- a/utils/TableGen/NeonEmitter.cpp +++ b/utils/TableGen/NeonEmitter.cpp @@ -532,6 +532,12 @@ public: ClassMap[NoTestOpI] = ClassNoTest; } + ~NeonEmitter() { + for (auto &P : IntrinsicMap) + for (Intrinsic *I : P.second) + delete I; + } + // run - Emit arm_neon.h.inc void run(raw_ostream &o);