[PATCH] D122338: [OPENMP] Eliminate extra set of simd variant function attribute.
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 24 09:08:25 PDT 2022
ABataev added inline comments.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:11992-11993
->getCanonicalDecl();
+ assert(ParamPositions.find(PVD) != ParamPositions.end());
Pos = ParamPositions[PVD];
}
----------------
ABataev wrote:
> Better to use `count()` or `contain()` (do not remember which one is defined for DenseMap), also add messages to asserts.
Or, if you already using `find`, better to do something like:
```
auto It = ParamPositions.find(PVD);
assert(It != ParamPositions.end() && "...");
Pos = It->second;
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122338/new/
https://reviews.llvm.org/D122338
More information about the cfe-commits
mailing list