1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

MC: Destroy Macro instances.

llvm-svn: 109720
This commit is contained in:
Daniel Dunbar 2010-07-29 01:51:55 +00:00
parent 6a1da7b4a5
commit 7972ac4c88

View File

@ -279,6 +279,13 @@ AsmParser::AsmParser(const Target &T, SourceMgr &_SM, MCContext &_Ctx,
}
AsmParser::~AsmParser() {
assert(ActiveMacros.empty() && "Unexpected active macro instantiation!");
// Destroy any macros.
for (StringMap<Macro*>::iterator it = MacroMap.begin(),
ie = MacroMap.end(); it != ie; ++it)
delete it->getValue();
delete PlatformParser;
delete GenericParser;
}