This is an archive of the discontinued LLVM Phabricator instance.

Move JIT listener C binding definitions to ExecutionEngineBindings.cpp.
ClosedPublic

Authored by anarazel on Jul 22 2018, 8:05 PM.

Details

Summary

Initially, in https://reviews.llvm.org/D44890, I had these defined as
empty functions when the respective event listener was not built
in. As done in that commit, that wasn't correct, because it was a ODR
violation. Krasimir hot-fixed that in r333265, but that wasn't quite
right either, because it'd lead to the symbol not being available.

Instead just move the function definition unconditionally to
ExecutionEngineBindings.cpp. That solves both problems. No ifdefs
needed, the ones in JITEventListener are sufficient.

Diff Detail

Repository
rL LLVM

Event Timeline

anarazel created this revision.Jul 22 2018, 8:05 PM
whitequark accepted this revision.Jul 23 2018, 11:00 PM
This revision is now accepted and ready to land.Jul 23 2018, 11:00 PM
anarazel updated this revision to Diff 157107.Jul 24 2018, 12:45 PM

Previous approach was a brick shy of a load, which I realized after
sleeping on it. We'd just end up with undefined symbol errors for the
listeners that *are* built in (because the part of the class
implementation ptentially is in a different lib). Hence just define
if necessary.

This revision was automatically updated to reflect the committed changes.