Fix another memory leak in TableGen AsmMatcher by deleting CodeGenInstAliases.

llvm-svn: 222912
This commit is contained in:
Craig Topper 2014-11-28 05:01:21 +00:00
parent 44586dc4d6
commit ce27489293
1 changed files with 5 additions and 0 deletions

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