diff options
| -rw-r--r-- | llvm/utils/TableGen/AsmMatcherEmitter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp index 45fc26801d3..366fbc3744b 100644 --- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp +++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp @@ -442,6 +442,11 @@ struct MatchableInfo { AsmString(Alias->AsmString) { } + ~MatchableInfo() { + if (DefRec.is<const CodeGenInstAlias*>()) + delete DefRec.get<const CodeGenInstAlias*>(); + } + // 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); |

