aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ExecutionEngine
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ExecutionEngine')
-rw-r--r--include/llvm/ExecutionEngine/ExecutionEngine.h5
-rw-r--r--include/llvm/ExecutionEngine/JITEventListener.h7
2 files changed, 7 insertions, 5 deletions
diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h
index 92f552d..b5b664d 100644
--- a/include/llvm/ExecutionEngine/ExecutionEngine.h
+++ b/include/llvm/ExecutionEngine/ExecutionEngine.h
@@ -263,9 +263,8 @@ public:
/// getPointerToFunction - The different EE's represent function bodies in
/// different ways. They should each implement this to say what a function
/// pointer should look like. When F is destroyed, the ExecutionEngine will
- /// remove its global mapping but will not yet free its machine code. Call
- /// freeMachineCodeForFunction(F) explicitly to do that. Note that global
- /// optimizations can destroy Functions without notifying the ExecutionEngine.
+ /// remove its global mapping and free any machine code. Be sure no threads
+ /// are running inside F when that happens.
///
virtual void *getPointerToFunction(Function *F) = 0;
diff --git a/include/llvm/ExecutionEngine/JITEventListener.h b/include/llvm/ExecutionEngine/JITEventListener.h
index 3623bf0..dcc66b2 100644
--- a/include/llvm/ExecutionEngine/JITEventListener.h
+++ b/include/llvm/ExecutionEngine/JITEventListener.h
@@ -63,8 +63,11 @@ public:
/// NotifyFreeingMachineCode - This is called inside of
/// freeMachineCodeForFunction(), after the global mapping is removed, but
/// before the machine code is returned to the allocator. OldPtr is the
- /// address of the machine code.
- virtual void NotifyFreeingMachineCode(const Function &F, void *OldPtr) {}
+ /// address of the machine code and will be the same as the Code parameter to
+ /// a previous NotifyFunctionEmitted call. The Function passed to
+ /// NotifyFunctionEmitted may have been destroyed by the time of the matching
+ /// NotifyFreeingMachineCode call.
+ virtual void NotifyFreeingMachineCode(void *OldPtr) {}
};
// This returns NULL if support isn't available.