Update for llm api change.

llvm-svn: 212372
This commit is contained in:
Rafael Espindola 2014-07-05 11:39:02 +00:00
parent d5a8efe733
commit 22c187be1d
7 changed files with 18 additions and 14 deletions

View File

@ -86,7 +86,8 @@ DynamicFile<ELFT>::create(std::unique_ptr<llvm::MemoryBuffer> mb,
std::unique_ptr<DynamicFile> file(new DynamicFile(mb->getBufferIdentifier()));
std::error_code ec;
file->_objFile.reset(new llvm::object::ELFFile<ELFT>(mb.release(), ec));
file->_objFile.reset(
new llvm::object::ELFFile<ELFT>(mb.release()->getBuffer(), ec));
if (ec)
return ec;

View File

@ -410,7 +410,8 @@ ELFFile<ELFT>::create(std::unique_ptr<MemoryBuffer> mb, bool atomizeStrings) {
std::unique_ptr<ELFFile<ELFT>> file(
new ELFFile<ELFT>(mb->getBufferIdentifier(), atomizeStrings));
file->_objFile.reset(new llvm::object::ELFFile<ELFT>(mb.release(), ec));
file->_objFile.reset(
new llvm::object::ELFFile<ELFT>(mb.release()->getBuffer(), ec));
if (ec)
return ec;

View File

@ -54,8 +54,8 @@ public:
std::size_t maxAlignment =
1ULL << llvm::countTrailingZeros(uintptr_t(mb->getBufferStart()));
auto f = createELF<ELFFileCreateELFTraits>(
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<DynamicFileCreateELFTraits>(
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));

View File

@ -127,7 +127,8 @@ public:
std::unique_ptr<HexagonELFFile<ELFT>> file(
new HexagonELFFile<ELFT>(mb->getBufferIdentifier(), atomizeStrings));
file->_objFile.reset(new llvm::object::ELFFile<ELFT>(mb.release(), ec));
file->_objFile.reset(
new llvm::object::ELFFile<ELFT>(mb.release()->getBuffer(), ec));
if (ec)
return ec;

View File

@ -49,8 +49,8 @@ public:
std::size_t maxAlignment =
1ULL << llvm::countTrailingZeros(uintptr_t(mb->getBufferStart()));
auto f = createELF<HexagonELFFileCreateELFTraits>(
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<HexagonDynamicFileCreateELFTraits>(
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));

View File

@ -77,7 +77,8 @@ public:
std::unique_ptr<MipsELFFile<ELFT>> file(
new MipsELFFile<ELFT>(mb->getBufferIdentifier(), atomizeStrings));
file->_objFile.reset(new llvm::object::ELFFile<ELFT>(mb.release(), ec));
file->_objFile.reset(
new llvm::object::ELFFile<ELFT>(mb.release()->getBuffer(), ec));
if (ec)
return ec;

View File

@ -35,8 +35,8 @@ public:
std::size_t maxAlignment =
1ULL << llvm::countTrailingZeros(uintptr_t(mb->getBufferStart()));
auto f = createELF<MipsELFFileCreateTraits>(
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));