summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterDecl.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2018-08-15 19:45:12 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2018-08-15 19:45:12 +0000
commitd01b74974ba2e87cfc1f05a08ccad54feb9ceb49 (patch)
tree1c8fee61f2d911f49c7aee8b7d60881a88cebaa9 /clang/lib/Serialization/ASTWriterDecl.cpp
parentdfb4f61d971a52c0c859b6483a16199aa4d2103b (diff)
downloadbcm5719-llvm-d01b74974ba2e87cfc1f05a08ccad54feb9ceb49.tar.gz
bcm5719-llvm-d01b74974ba2e87cfc1f05a08ccad54feb9ceb49.zip
[OPENMP] FIx processing of declare target variables.
The compiler may produce unexpected error messages/crashes when declare target variables were used. Patch fixes problems with the declarations marked as declare target to or link. llvm-svn: 339805
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterDecl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp
index 2d90c98faaa..8eb6c61525d 100644
--- a/clang/lib/Serialization/ASTWriterDecl.cpp
+++ b/clang/lib/Serialization/ASTWriterDecl.cpp
@@ -2237,8 +2237,7 @@ static bool isRequiredDecl(const Decl *D, ASTContext &Context,
// File scoped assembly or obj-c or OMP declare target implementation must be
// seen.
- if (isa<FileScopeAsmDecl>(D) || isa<ObjCImplDecl>(D) ||
- D->hasAttr<OMPDeclareTargetDeclAttr>())
+ if (isa<FileScopeAsmDecl>(D) || isa<ObjCImplDecl>(D))
return true;
if (WritingModule && (isa<VarDecl>(D) || isa<ImportDecl>(D))) {
OpenPOWER on IntegriCloud