diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2020-10-28 13:55:43 +0100 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2020-10-28 13:58:23 +0100 |
commit | 90a9f97cbda3bef63d9866d300b73b8ccf65c7f5 (patch) | |
tree | b1757d3071b0799693097bb8fd8501378246445d /clang/lib/CodeGen/CGOpenMPRuntime.cpp | |
parent | Revert "[OpenMP] Add Passing in Original Declaration Names To Mapper API" (diff) | |
download | llvm-project-90a9f97cbda3bef63d9866d300b73b8ccf65c7f5.tar.gz llvm-project-90a9f97cbda3bef63d9866d300b73b8ccf65c7f5.tar.bz2 llvm-project-90a9f97cbda3bef63d9866d300b73b8ccf65c7f5.zip |
[openmp] Use front() instead of *begin() to not hide bugs when CurTypes is empty.
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntime.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index 3cc4a6b6c9e4..d59dd6a2e7f7 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -7989,7 +7989,7 @@ public: })) CombinedInfo.Types.back() |= OMP_MAP_PRESENT; // Remove TARGET_PARAM flag from the first element - (*CurTypes.begin()) &= ~OMP_MAP_TARGET_PARAM; + CurTypes.front() &= ~OMP_MAP_TARGET_PARAM; // All other current entries will be MEMBER_OF the combined entry // (except for PTR_AND_OBJ entries which do not have a placeholder value |