summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-08-23 16:11:14 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2019-08-23 16:11:14 +0000
commit729e242a7972f4802f982a4b4dabb964aa299675 (patch)
tree2dd14a03a492c3edbbb4fd95f31cf9768fda9923 /clang/lib/Serialization
parentf692963600cc2a2748a2963bb3553bbdb4732ac8 (diff)
downloadbcm5719-llvm-729e242a7972f4802f982a4b4dabb964aa299675.tar.gz
bcm5719-llvm-729e242a7972f4802f982a4b4dabb964aa299675.zip
[OPENMP5.0]Add support for device_type clause in declare target
construct. OpenMP 5.0 introduced new clause for declare target directive, device_type clause, which may accept values host, nohost, and any. Host means that the function must be emitted only for the host, nohost - only for the device, and any - for both, device and the host. llvm-svn: 369775
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r--clang/lib/Serialization/ASTReaderDecl.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index b40e3cf8926..15797ba3488 100644
--- a/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/clang/lib/Serialization/ASTReaderDecl.cpp
@@ -4571,12 +4571,15 @@ void ASTDeclReader::UpdateDecl(Decl *D,
break;
}
- case UPD_DECL_MARKED_OPENMP_DECLARETARGET:
+ case UPD_DECL_MARKED_OPENMP_DECLARETARGET: {
+ OMPDeclareTargetDeclAttr::MapTypeTy MapType =
+ static_cast<OMPDeclareTargetDeclAttr::MapTypeTy>(Record.readInt());
+ OMPDeclareTargetDeclAttr::DevTypeTy DevType =
+ static_cast<OMPDeclareTargetDeclAttr::DevTypeTy>(Record.readInt());
D->addAttr(OMPDeclareTargetDeclAttr::CreateImplicit(
- Reader.getContext(),
- static_cast<OMPDeclareTargetDeclAttr::MapTypeTy>(Record.readInt()),
- ReadSourceRange()));
+ Reader.getContext(), MapType, DevType, ReadSourceRange()));
break;
+ }
case UPD_ADDED_ATTR_TO_RECORD:
AttrVec Attrs;
OpenPOWER on IntegriCloud