llvm-mc: Fix memory leak of MCAsmInfo.

llvm-svn: 99098
This commit is contained in:
Daniel Dunbar 2010-03-20 22:36:25 +00:00
parent fed917e078
commit c5621ed07a
1 changed files with 2 additions and 2 deletions

View File

@ -152,7 +152,7 @@ static int AsLexInput(const char *ProgName) {
if (!TheTarget)
return 1;
const MCAsmInfo *MAI = TheTarget->createAsmInfo(TripleName);
llvm::OwningPtr<MCAsmInfo> MAI((MCAsmInfo*) TheTarget->createAsmInfo(TripleName));
assert(MAI && "Unable to create target asm info!");
AsmLexer Lexer(*MAI);
@ -260,7 +260,7 @@ static int AssembleInput(const char *ProgName) {
SrcMgr.setIncludeDirs(IncludeDirs);
const MCAsmInfo *MAI = TheTarget->createAsmInfo(TripleName);
llvm::OwningPtr<MCAsmInfo> MAI((MCAsmInfo*) TheTarget->createAsmInfo(TripleName));
assert(MAI && "Unable to create target asm info!");
MCContext Ctx(*MAI);