diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-10-08 19:44:16 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-10-08 19:44:16 +0000 |
commit | 303657a6c6f440f1855f6680c8bb1c8a7b815535 (patch) | |
tree | 96160f0aad0f872949c70622344b899530166d86 /clang/lib/CodeGen/CGOpenMPRuntime.cpp | |
parent | 07c5f2a9b0add36974250cd9ab9152458e8b3361 (diff) | |
download | bcm5719-llvm-303657a6c6f440f1855f6680c8bb1c8a7b815535.tar.gz bcm5719-llvm-303657a6c6f440f1855f6680c8bb1c8a7b815535.zip |
[OPENMP50]Multiple vendors in vendor context must be treated as logical
and of vendors, not or.
If several vendors are provided in the same vendor context trait, the
context shall match only if all vendors are matching, not one of them.
This is per OpenMP 5.0, 2.3.3 Matching and Scoring Context Selectors,
all selectors in the construct, device, and implementation sets of the
context selector appear in the corresponding trait set of the OpenMP
context.
llvm-svn: 374107
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntime.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index e9cf6928885..d2f18a5767b 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -11172,7 +11172,8 @@ template <> bool checkContext<OMPDeclareVariantAttr::CtxSetImplementation, OMPDeclareVariantAttr::CtxVendor>( const OMPDeclareVariantAttr *A) { - return !A->getImplVendor().compare("llvm"); + return llvm::all_of(A->implVendors(), + [](StringRef S) { return !S.compare_lower("llvm"); }); } static bool greaterCtxScore(ASTContext &Ctx, const Expr *LHS, const Expr *RHS) { |