mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
llvm-nm: Don't leak bitcode buffers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141534 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5d53ff54c0
commit
1a9908daeb
@ -330,10 +330,10 @@ static void DumpSymbolNamesFromFile(std::string &Filename) {
|
||||
OwningPtr<Binary> child;
|
||||
if (error_code ec = i->getAsBinary(child)) {
|
||||
// Try opening it as a bitcode file.
|
||||
MemoryBuffer *buff = i->getBuffer();
|
||||
OwningPtr<MemoryBuffer> buff(i->getBuffer());
|
||||
Module *Result = 0;
|
||||
if (buff)
|
||||
Result = ParseBitcodeFile(buff, Context, &ErrorMessage);
|
||||
Result = ParseBitcodeFile(buff.get(), Context, &ErrorMessage);
|
||||
|
||||
if (Result) {
|
||||
DumpSymbolNamesFromModule(Result);
|
||||
|
Loading…
x
Reference in New Issue
Block a user