[OPENMP]Increment iterator when the loop is continued.

Summary:
Missed operation of the incrementing iterator when required just to
continue execution.

Reviewers: kkwli0, gtbercea, grokos

Subscribers: guansong, openmp-commits

Differential Revision: https://reviews.llvm.org/D51937

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@341964 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/libomptarget/src/omptarget.cpp b/libomptarget/src/omptarget.cpp
index 233de9e..fd22688 100644
--- a/libomptarget/src/omptarget.cpp
+++ b/libomptarget/src/omptarget.cpp
@@ -423,8 +423,10 @@
 
         // An STL map is sorted on its keys; use this property
         // to quickly determine when to break out of the loop.
-        if ((uintptr_t) ShadowHstPtrAddr < lb)
+        if ((uintptr_t) ShadowHstPtrAddr < lb) {
+          ++it;
           continue;
+        }
         if ((uintptr_t) ShadowHstPtrAddr >= ub)
           break;