mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-13 08:26:02 +00:00
llvm-mc: Fix memory leak of MCAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99098 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -152,7 +152,7 @@ static int AsLexInput(const char *ProgName) {
|
|||||||
if (!TheTarget)
|
if (!TheTarget)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
const MCAsmInfo *MAI = TheTarget->createAsmInfo(TripleName);
|
llvm::OwningPtr<MCAsmInfo> MAI((MCAsmInfo*) TheTarget->createAsmInfo(TripleName));
|
||||||
assert(MAI && "Unable to create target asm info!");
|
assert(MAI && "Unable to create target asm info!");
|
||||||
|
|
||||||
AsmLexer Lexer(*MAI);
|
AsmLexer Lexer(*MAI);
|
||||||
@@ -260,7 +260,7 @@ static int AssembleInput(const char *ProgName) {
|
|||||||
SrcMgr.setIncludeDirs(IncludeDirs);
|
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!");
|
assert(MAI && "Unable to create target asm info!");
|
||||||
|
|
||||||
MCContext Ctx(*MAI);
|
MCContext Ctx(*MAI);
|
||||||
|
Reference in New Issue
Block a user