mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-10 22:46:25 +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:
parent
5d067fe158
commit
d40297ce49
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user