From 22c187be1d809984ae16d7618f8b65911c2e1596 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 5 Jul 2014 11:39:02 +0000 Subject: [PATCH] Update for llm api change. llvm-svn: 212372 --- lld/lib/ReaderWriter/ELF/DynamicFile.h | 3 ++- lld/lib/ReaderWriter/ELF/ELFFile.h | 3 ++- lld/lib/ReaderWriter/ELF/ELFReader.h | 8 ++++---- lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h | 3 ++- lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h | 8 ++++---- lld/lib/ReaderWriter/ELF/Mips/MipsELFFile.h | 3 ++- lld/lib/ReaderWriter/ELF/Mips/MipsELFReader.h | 4 ++-- 7 files changed, 18 insertions(+), 14 deletions(-) diff --git a/lld/lib/ReaderWriter/ELF/DynamicFile.h b/lld/lib/ReaderWriter/ELF/DynamicFile.h index fefba30b9eae..70153c5049bd 100644 --- a/lld/lib/ReaderWriter/ELF/DynamicFile.h +++ b/lld/lib/ReaderWriter/ELF/DynamicFile.h @@ -86,7 +86,8 @@ DynamicFile::create(std::unique_ptr mb, std::unique_ptr file(new DynamicFile(mb->getBufferIdentifier())); std::error_code ec; - file->_objFile.reset(new llvm::object::ELFFile(mb.release(), ec)); + file->_objFile.reset( + new llvm::object::ELFFile(mb.release()->getBuffer(), ec)); if (ec) return ec; diff --git a/lld/lib/ReaderWriter/ELF/ELFFile.h b/lld/lib/ReaderWriter/ELF/ELFFile.h index ccd6ad2e9a13..0bf08d0c92e7 100644 --- a/lld/lib/ReaderWriter/ELF/ELFFile.h +++ b/lld/lib/ReaderWriter/ELF/ELFFile.h @@ -410,7 +410,8 @@ ELFFile::create(std::unique_ptr mb, bool atomizeStrings) { std::unique_ptr> file( new ELFFile(mb->getBufferIdentifier(), atomizeStrings)); - file->_objFile.reset(new llvm::object::ELFFile(mb.release(), ec)); + file->_objFile.reset( + new llvm::object::ELFFile(mb.release()->getBuffer(), ec)); if (ec) return ec; diff --git a/lld/lib/ReaderWriter/ELF/ELFReader.h b/lld/lib/ReaderWriter/ELF/ELFReader.h index d288b66d1bdf..dd589baaa55e 100644 --- a/lld/lib/ReaderWriter/ELF/ELFReader.h +++ b/lld/lib/ReaderWriter/ELF/ELFReader.h @@ -54,8 +54,8 @@ public: std::size_t maxAlignment = 1ULL << llvm::countTrailingZeros(uintptr_t(mb->getBufferStart())); auto f = createELF( - llvm::object::getElfArchType(&*mb), maxAlignment, std::move(mb), - _atomizeStrings); + llvm::object::getElfArchType(mb->getBuffer()), maxAlignment, + std::move(mb), _atomizeStrings); if (std::error_code ec = f.getError()) return ec; result.push_back(std::move(*f)); @@ -81,8 +81,8 @@ public: std::size_t maxAlignment = 1ULL << llvm::countTrailingZeros(uintptr_t(mb->getBufferStart())); auto f = createELF( - llvm::object::getElfArchType(&*mb), maxAlignment, std::move(mb), - _useUndefines); + llvm::object::getElfArchType(mb->getBuffer()), maxAlignment, + std::move(mb), _useUndefines); if (std::error_code ec = f.getError()) return ec; result.push_back(std::move(*f)); diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h index 5205d65f734c..6d93ed4a8005 100644 --- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h +++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h @@ -127,7 +127,8 @@ public: std::unique_ptr> file( new HexagonELFFile(mb->getBufferIdentifier(), atomizeStrings)); - file->_objFile.reset(new llvm::object::ELFFile(mb.release(), ec)); + file->_objFile.reset( + new llvm::object::ELFFile(mb.release()->getBuffer(), ec)); if (ec) return ec; diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h index 6bc6ee09cd89..1a69eb3a909c 100644 --- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h +++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h @@ -49,8 +49,8 @@ public: std::size_t maxAlignment = 1ULL << llvm::countTrailingZeros(uintptr_t(mb->getBufferStart())); auto f = createELF( - llvm::object::getElfArchType(&*mb), maxAlignment, std::move(mb), - _atomizeStrings); + llvm::object::getElfArchType(mb->getBuffer()), maxAlignment, + std::move(mb), _atomizeStrings); if (std::error_code ec = f.getError()) return ec; result.push_back(std::move(*f)); @@ -68,8 +68,8 @@ public: std::size_t maxAlignment = 1ULL << llvm::countTrailingZeros(uintptr_t(mb->getBufferStart())); auto f = createELF( - llvm::object::getElfArchType(&*mb), maxAlignment, std::move(mb), - _useUndefines); + llvm::object::getElfArchType(mb->getBuffer()), maxAlignment, + std::move(mb), _useUndefines); if (std::error_code ec = f.getError()) return ec; result.push_back(std::move(*f)); diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsELFFile.h b/lld/lib/ReaderWriter/ELF/Mips/MipsELFFile.h index 0230267181ab..e244d135f428 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsELFFile.h +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsELFFile.h @@ -77,7 +77,8 @@ public: std::unique_ptr> file( new MipsELFFile(mb->getBufferIdentifier(), atomizeStrings)); - file->_objFile.reset(new llvm::object::ELFFile(mb.release(), ec)); + file->_objFile.reset( + new llvm::object::ELFFile(mb.release()->getBuffer(), ec)); if (ec) return ec; diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsELFReader.h b/lld/lib/ReaderWriter/ELF/Mips/MipsELFReader.h index 91fcc50bc086..d40d3621aca9 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsELFReader.h +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsELFReader.h @@ -35,8 +35,8 @@ public: std::size_t maxAlignment = 1ULL << llvm::countTrailingZeros(uintptr_t(mb->getBufferStart())); auto f = createELF( - llvm::object::getElfArchType(&*mb), maxAlignment, std::move(mb), - _atomizeStrings); + llvm::object::getElfArchType(mb->getBuffer()), maxAlignment, + std::move(mb), _atomizeStrings); if (std::error_code ec = f.getError()) return ec; result.push_back(std::move(*f));