Created
April 15, 2014 13:22
-
-
Save chapuni/10732188 to your computer and use it in GitHub Desktop.
memory leak on Operands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp | |
+++ b/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp | |
@@ -4197,6 +4197,7 @@ bool ARM64AsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, | |
if (Op->isVectorIndexD() && Op->getVectorIndex() == 1) { | |
SMLoc Loc = Op->getStartLoc(); | |
Operands.pop_back(); | |
+ delete Op; | |
Operands.push_back( | |
ARM64Operand::CreateToken("[", false, Loc, getContext())); | |
Operands.push_back( | |
@@ -4218,6 +4219,7 @@ bool ARM64AsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, | |
Operands.insert( | |
Operands.begin() + OpNo + 2, | |
ARM64Operand::CreateToken("]", false, Loc, getContext())); | |
+ delete Op; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment