Removing traces of takeOwnershipOfBuffers left after r251560

Joshua Gerrard via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 01:54:46 PST 2015


I believe this was fixed in r251560. Please see attached patch.

I've never submitted anything to the project before, so please be patient
with me if there's some procedure I've missed.

--
Joshua Gerrard
JUCE Software Developer

*ROLI’s **award-winning*
<http://www.telegraph.co.uk/luxury/design/31520/the-seaboard-grand-piano-wins-designs-of-the-year-2014-award.html>*
Seaboard
GRAND, celebrated as the “**piano of the future*
<http://edition.cnn.com/2013/09/27/tech/innovation/hans-zimmer-seaboard-future-piano/>*”,
is now joined by the **Seaboard RISE*
<https://www.youtube.com/watch?v=fGr7VbDiRNw>*, “**every bit as slimline
and attractive as its bigger brother*
<http://www.soundonsound.com/news?NewsID=18726>*”. The press is hailing the
Seaboard RISE as “**innovative*
<http://www.wired.co.uk/news/archive/2015-09/10/seaboard-rise-digital-keyboard-launch-uk-price>*”,
“**expressive*
<http://createdigitalmusic.com/2015/09/new-roli-instrument-wants-make-expressive-control-mainstream/>*”,
“**accessible*
<http://createdigitalmusic.com/2015/09/new-roli-instrument-wants-make-expressive-control-mainstream/>*”,
and “**a keyboard controller that does to piano keys what 3D touch does to
the iPhone*
<http://www.slashgear.com/roli-seaboard-rise-is-like-3d-touch-for-musicians-11404216/>*”.
Now available for preorder at **www.roli.com* <http://www.roli.com/>*.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151203/b54a1b19/attachment.html>
-------------- next part --------------
Index: include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h
===================================================================
--- include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h	(revision 254594)
+++ include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h	(working copy)
@@ -87,14 +87,6 @@
     BaseLayer.mapSectionAddress(H, LocalAddress, TargetAddr);
   }
 
-  // Ownership hack.
-  // FIXME: Remove this as soon as RuntimeDyldELF can apply relocations without
-  //        referencing the original object.
-  template <typename OwningMBSet>
-  void takeOwnershipOfBuffers(ObjSetHandleT H, OwningMBSet MBs) {
-    BaseLayer.takeOwnershipOfBuffers(H, std::move(MBs));
-  }
-
   /// @brief Access the transform functor directly.
   TransformFtor &getTransform() { return Transform; }
 
Index: tools/llvm-rtdyld/llvm-rtdyld.cpp
===================================================================
--- tools/llvm-rtdyld/llvm-rtdyld.cpp	(revision 254594)
+++ tools/llvm-rtdyld/llvm-rtdyld.cpp	(working copy)
@@ -388,11 +388,6 @@
   doPreallocation(MemMgr);
   RuntimeDyld Dyld(MemMgr, MemMgr);
 
-  // FIXME: Preserve buffers until resolveRelocations time to work around a bug
-  //        in RuntimeDyldELF.
-  // This fixme should be fixed ASAP. This is a very brittle workaround.
-  std::vector<std::unique_ptr<MemoryBuffer>> InputBuffers;
-
   // If we don't have any input files, read from stdin.
   if (!InputFileList.size())
     InputFileList.push_back("-");
@@ -409,7 +404,6 @@
       return Error("unable to create object file: '" + EC.message() + "'");
 
     ObjectFile &Obj = **MaybeObj;
-    InputBuffers.push_back(std::move(*InputBuffer));
 
     // Load the object file
     Dyld.loadObject(Obj);
@@ -656,11 +650,6 @@
   RuntimeDyldChecker Checker(Dyld, Disassembler.get(), InstPrinter.get(),
                              llvm::dbgs());
 
-  // FIXME: Preserve buffers until resolveRelocations time to work around a bug
-  //        in RuntimeDyldELF.
-  // This fixme should be fixed ASAP. This is a very brittle workaround.
-  std::vector<std::unique_ptr<MemoryBuffer>> InputBuffers;
-
   // If we don't have any input files, read from stdin.
   if (!InputFileList.size())
     InputFileList.push_back("-");
@@ -679,7 +668,6 @@
       return Error("unable to create object file: '" + EC.message() + "'");
 
     ObjectFile &Obj = **MaybeObj;
-    InputBuffers.push_back(std::move(*InputBuffer));
 
     // Load the object file
     Dyld.loadObject(Obj);
Index: unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp
===================================================================
--- unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp	(revision 254594)
+++ unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp	(working copy)
@@ -157,21 +157,6 @@
     resetExpectations();
   }
 
-  template <typename OwningMBSet>
-  void takeOwnershipOfBuffers(ObjSetHandleT H, OwningMBSet MBs) {
-    EXPECT_EQ(MockObjSetHandle, H);
-    EXPECT_EQ(MockBufferSet, *MBs);
-    LastCalled = "takeOwnershipOfBuffers";
-  }
-  void expectTakeOwnershipOfBuffers(ObjSetHandleT H, MockMemoryBufferSet *MBs) {
-    MockObjSetHandle = H;
-    MockBufferSet = *MBs;
-  }
-  void verifyTakeOwnershipOfBuffers() {
-    EXPECT_EQ("takeOwnershipOfBuffers", LastCalled);
-    resetExpectations();
-  }
-
 private:
   // Backing fields for remembering parameter/return values
   std::string LastCalled;
@@ -275,18 +260,6 @@
   T1.mapSectionAddress(H, Buffer, MockAddress);
   M.verifyMapSectionAddress();
 
-  // Test takeOwnershipOfBuffers, using unique pointer to buffer set
-  auto MockBufferSetPtr = llvm::make_unique<MockMemoryBufferSet>(366);
-  M.expectTakeOwnershipOfBuffers(H, MockBufferSetPtr.get());
-  T2.takeOwnershipOfBuffers(H, std::move(MockBufferSetPtr));
-  M.verifyTakeOwnershipOfBuffers();
-
-  // Test takeOwnershipOfBuffers, using naked pointer to buffer set
-  MockMemoryBufferSet MockBufferSet = 266;
-  M.expectTakeOwnershipOfBuffers(H, &MockBufferSet);
-  T1.takeOwnershipOfBuffers(H, &MockBufferSet);
-  M.verifyTakeOwnershipOfBuffers();
-
   // Verify transform getter (non-const)
   MockObjectFile Mutatee = 277;
   MockObjectFile *Out = T2.getTransform()(&Mutatee);


More information about the llvm-commits mailing list