diff options
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/llvm-nm/llvm-nm.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-nm/llvm-nm.cpp b/llvm/tools/llvm-nm/llvm-nm.cpp index 10cf45072c2..550ca4f13fa 100644 --- a/llvm/tools/llvm-nm/llvm-nm.cpp +++ b/llvm/tools/llvm-nm/llvm-nm.cpp @@ -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); |