summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/JIT/JIT.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/JIT.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JIT.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
index 063b35f478c..b7ab6470c21 100644
--- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
@@ -110,11 +110,9 @@ public:
MutexGuard guard(Lock);
assert(JITs.size() != 0 && "No Jit registered");
//search function in every instance of JIT
- for (SmallPtrSet<JIT*, 1>::const_iterator Jit = JITs.begin(),
- end = JITs.end();
- Jit != end; ++Jit) {
- if (Function *F = (*Jit)->FindFunctionNamed(Name))
- return (*Jit)->getPointerToFunction(F);
+ for (JIT *Jit : JITs) {
+ if (Function *F = Jit->FindFunctionNamed(Name))
+ return Jit->getPointerToFunction(F);
}
// The function is not available : fallback on the first created (will
// search in symbol of the current program/library)
OpenPOWER on IntegriCloud