[PATCH] D83922: [OpenMP] Fix map clause for unused var: don't ignore it
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 16 07:25:09 PDT 2020
ABataev added inline comments.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7948-7949
+ MapFlagsArrayTy &Types,
+ const llvm::DenseSet<const ValueDecl *> &SkipVarSet =
+ llvm::DenseSet<const ValueDecl *>()) const {
// We have to process the component lists that relate with the same
----------------
Use `llvm::DenseSet<CanonicalDeclPtr<const ValueDecl>> &SkipVarSet`.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9439
llvm::DenseMap<llvm::Value *, llvm::Value *> LambdaPointers;
+ llvm::DenseSet<const ValueDecl *> MappedVarSet;
----------------
`llvm::DenseSet<CanonicalDeclPtr<const ValueDecl>> MappedVarSet;`
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9469
+ if (!CI->capturesThis())
+ MappedVarSet.insert(CI->getCapturedVar()->getCanonicalDecl());
+ else
----------------
No need to get canonical decl here for `llvm::DenseSet<CanonicalDeclPtr<const ValueDecl>>`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83922/new/
https://reviews.llvm.org/D83922
More information about the cfe-commits
mailing list