[PATCH] D51378: [OPENMP] Add support for nested 'declare target' directives
Jonas Hahnfeld via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 30 04:22:13 PDT 2018
Hahnfeld added a comment.
In https://reviews.llvm.org/D51378#1218184, @RaviNarayanaswamy wrote:
> We should just go with generating an error if the DeclareTargetNestingLevel is not 0 at the end of compilation unit.
> Hard to detect if user accidentally forgot to have end declare in header file and had it in the include file or it was intentional.
That will effectively forbid the legacy approach of doing
#pragma omp declare target
#include <...>
#pragma omp end declare target
as in the test because `DeclareTargetNestingLevel` will be 1 throughout the header file. I think that's still relevant today, so the condition should be "has the same value as when entering this file".
Repository:
rC Clang
https://reviews.llvm.org/D51378
More information about the cfe-commits
mailing list