Skip to content

Commit

Permalink
Revert "[Orc] Add NotifyCreated callback for LLJITBuilder (#84175)"
Browse files Browse the repository at this point in the history
This reverts commit f78129e.
  • Loading branch information
joker-eph committed Mar 7, 2024
1 parent 10edabb commit b67fec3
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,6 @@ class LLJITBuilderState {

using PlatformSetupFunction = unique_function<Expected<JITDylibSP>(LLJIT &J)>;

using NotifyCreatedFunction = std::function<Error(LLJIT &)>;

std::unique_ptr<ExecutorProcessControl> EPC;
std::unique_ptr<ExecutionSession> ES;
std::optional<JITTargetMachineBuilder> JTMB;
Expand All @@ -323,7 +321,6 @@ class LLJITBuilderState {
CompileFunctionCreator CreateCompileFunction;
unique_function<Error(LLJIT &)> PrePlatformSetup;
PlatformSetupFunction SetUpPlatform;
NotifyCreatedFunction NotifyCreated;
unsigned NumCompileThreads = 0;

/// Called prior to JIT class construcion to fix up defaults.
Expand Down Expand Up @@ -444,16 +441,6 @@ class LLJITBuilderSetters {
return impl();
}

/// Set up a callback after successful construction of the JIT.
///
/// This is useful to attach generators to JITDylibs or inject initial symbol
/// definitions.
SetterImpl &
setNotifyCreatedCallback(LLJITBuilderState::NotifyCreatedFunction Callback) {
impl().NotifyCreated = std::move(Callback);
return impl();
}

/// Set the number of compile threads to use.
///
/// If set to zero, compilation will be performed on the execution thread when
Expand Down Expand Up @@ -487,11 +474,6 @@ class LLJITBuilderSetters {
std::unique_ptr<JITType> J(new JITType(impl(), Err));
if (Err)
return std::move(Err);

if (impl().NotifyCreated)
if (Error Err = impl().NotifyCreated(*J))
return Err;

return std::move(J);
}

Expand Down

0 comments on commit b67fec3

Please sign in to comment.