From 660f260a3fe9012a0da7c0c5ef8b3d6851002e7d Mon Sep 17 00:00:00 2001 From: Kelvin Li Date: Mon, 10 Sep 2018 02:07:09 +0000 Subject: [OpenMP] Add support for nested 'declare target' directives Add the capability to nest multiple declare target directives - including header files within a declare target region. Differential Revision: https://reviews.llvm.org/D51378 Patch by Patrick Lyster git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341766 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Parse/ParseOpenMP.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Parse/ParseOpenMP.cpp') diff --git a/lib/Parse/ParseOpenMP.cpp b/lib/Parse/ParseOpenMP.cpp index b3c7e3a63d..4da357bbbc 100644 --- a/lib/Parse/ParseOpenMP.cpp +++ b/lib/Parse/ParseOpenMP.cpp @@ -775,8 +775,8 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirectiveWithExtDecl( llvm::SmallVector Decls; DKind = parseOpenMPDirectiveKind(*this); - while (DKind != OMPD_end_declare_target && DKind != OMPD_declare_target && - Tok.isNot(tok::eof) && Tok.isNot(tok::r_brace)) { + while (DKind != OMPD_end_declare_target && Tok.isNot(tok::eof) && + Tok.isNot(tok::r_brace)) { DeclGroupPtrTy Ptr; // Here we expect to see some function declaration. if (AS == AS_none) { -- cgit v1.2.1