From: Craig Topper Date: Fri, 28 Nov 2014 05:01:21 +0000 (+0000) Subject: Fix another memory leak in TableGen AsmMatcher by deleting CodeGenInstAliases. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=9fd6eebf92fc7fb5887a8f822f765e2e2d7d268f;p=oota-llvm.git Fix another memory leak in TableGen AsmMatcher by deleting CodeGenInstAliases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222912 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index 45fc26801d3..366fbc3744b 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -442,6 +442,11 @@ struct MatchableInfo { AsmString(Alias->AsmString) { } + ~MatchableInfo() { + if (DefRec.is()) + delete DefRec.get(); + } + // Two-operand aliases clone from the main matchable, but mark the second // operand as a tied operand of the first for purposes of the assembler. void formTwoOperandAlias(StringRef Constraint);