From f02202b208907e8a5015a19f0bb1c6bcea8ba25f Mon Sep 17 00:00:00 2001 From: Yaron Keren Date: Thu, 6 Aug 2015 07:28:36 +0000 Subject: [PATCH] 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 --- utils/TableGen/NeonEmitter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.40.0