[PATCH] D11361: [OpenMP] Target directive host codegen
Jonas Hahnfeld via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 4 02:11:29 PDT 2015
Hahnfeld added a comment.
Needs two small changes to work with current trunk
================
Comment at: lib/CodeGen/CGStmtOpenMP.cpp:2135-2136
@@ +2134,4 @@
+ const Expr *IfCond = nullptr;
+ if (auto C = S.getSingleClause(OMPC_if)) {
+ IfCond = cast<OMPIfClause>(C)->getCondition();
+ }
----------------
This now has to be `S.getSingleClause<OMPIfClause>()` and we can therefore omit the cast...
================
Comment at: lib/CodeGen/CGStmtOpenMP.cpp:2141-2142
@@ +2140,4 @@
+ const Expr *Device = nullptr;
+ if (auto C = S.getSingleClause(OMPC_device)) {
+ Device = cast<OMPDeviceClause>(C)->getDevice();
+ }
----------------
Likewise `S.getSingleClause<OMPDeviceClause>()` without the need for an extra cast
http://reviews.llvm.org/D11361
More information about the cfe-commits
mailing list