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
This commit is contained in:
Craig Topper 2014-11-28 05:01:21 +00:00
parent 4c10f1789b
commit 9fd6eebf92

View File

@ -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);