[lld] r212372 - Update for llm api change.

Rafael Espindola rafael.espindola at gmail.com
Sat Jul 5 04:39:02 PDT 2014


Author: rafael
Date: Sat Jul  5 06:39:02 2014
New Revision: 212372

URL: http://llvm.org/viewvc/llvm-project?rev=212372&view=rev
Log:
Update for llm api change.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/DynamicFile.h
    lld/trunk/lib/ReaderWriter/ELF/ELFFile.h
    lld/trunk/lib/ReaderWriter/ELF/ELFReader.h
    lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h
    lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h
    lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h
    lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFReader.h

Modified: lld/trunk/lib/ReaderWriter/ELF/DynamicFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DynamicFile.h?rev=212372&r1=212371&r2=212372&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/DynamicFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/DynamicFile.h Sat Jul  5 06:39:02 2014
@@ -86,7 +86,8 @@ DynamicFile<ELFT>::create(std::unique_pt
   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;

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFFile.h?rev=212372&r1=212371&r2=212372&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFFile.h Sat Jul  5 06:39:02 2014
@@ -410,7 +410,8 @@ ELFFile<ELFT>::create(std::unique_ptr<Me
   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;

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFReader.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFReader.h?rev=212372&r1=212371&r2=212372&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFReader.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFReader.h Sat Jul  5 06:39:02 2014
@@ -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));

Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h?rev=212372&r1=212371&r2=212372&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h Sat Jul  5 06:39:02 2014
@@ -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;

Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h?rev=212372&r1=212371&r2=212372&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h Sat Jul  5 06:39:02 2014
@@ -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));

Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h?rev=212372&r1=212371&r2=212372&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h Sat Jul  5 06:39:02 2014
@@ -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;

Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFReader.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFReader.h?rev=212372&r1=212371&r2=212372&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFReader.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFReader.h Sat Jul  5 06:39:02 2014
@@ -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));





More information about the llvm-commits mailing list