[PATCH] D61065: [JITLink] Pass ObjectFile in NotifyLoaded() for JITEventListener support

Stefan Gränitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 03:21:50 PDT 2019


sgraenitz added a comment.

Ok I see, as long as the original MemoryBuffer exists, we can recreate an identical ObjectFile on the client side. Currently it gets deleted together with JITLinkContext when returning from jitLink().

After notifyResolved(), JITLinkContext deals with the Allocation and doesn't use its MemoryBuffer anymore right? Also, at this point NotifyLoaded is called currently. If so, we may:

1. either hand out ownership with the notification (not sure that's a good idea) and delete the (potentially moved-from) MemoryBuffer pointer here;
2. or pass it "back" to ObjectLinkingLayer (ObjectResources?) and hand out a MemBufferRef in NotifyLoaded instead (sounds more sane to me).

What do you think?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61065/new/

https://reviews.llvm.org/D61065





More information about the llvm-commits mailing list