aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-02-11 12:38:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-02-11 12:38:11 +0000
commite3b557809604d036af6e00c60f012c2025b59a5e (patch)
tree8a11ba2269a3b669601e2fd41145b174008f4da8 /llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
parent08e8dd7b9db7bb4a9de26d44c1cbfd24e869c014 (diff)
Diffstat (limited to 'llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index 4ac901daa5c8..869b383dd064 100644
--- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
@@ -261,10 +261,10 @@ void MCJIT::finalizeObject() {
// Generate code for module is going to move objects out of the 'added' list,
// so we need to copy that out before using it:
SmallVector<Module*, 16> ModsToAdd;
- for (auto M : OwnedModules.added())
+ for (auto *M : OwnedModules.added())
ModsToAdd.push_back(M);
- for (auto M : ModsToAdd)
+ for (auto *M : ModsToAdd)
generateCodeForModule(M);
finalizeLoadedModules();
@@ -659,9 +659,8 @@ void MCJIT::notifyObjectLoaded(const object::ObjectFile &Obj,
static_cast<uint64_t>(reinterpret_cast<uintptr_t>(Obj.getData().data()));
std::lock_guard<sys::Mutex> locked(lock);
MemMgr->notifyObjectLoaded(this, Obj);
- for (unsigned I = 0, S = EventListeners.size(); I < S; ++I) {
- EventListeners[I]->notifyObjectLoaded(Key, Obj, L);
- }
+ for (JITEventListener *EL : EventListeners)
+ EL->notifyObjectLoaded(Key, Obj, L);
}
void MCJIT::notifyFreeingObject(const object::ObjectFile &Obj) {