[PATCH] D70739: [OPENMP50]Add device/isa context selector support.

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 27 15:13:42 PST 2019


jdoerfert added inline comments.


================
Comment at: clang/include/clang/Sema/Sema.h:9320
   using OMPCtxSelectorData =
-      OpenMPCtxSelectorData<SmallVector<OMPCtxStringType, 4>, ExprResult>;
+      OpenMPCtxSelectorData<SmallVector<llvm::Any, 4>, ExprResult>;
 
----------------
ABataev wrote:
> jdoerfert wrote:
> > ABataev wrote:
> > > jdoerfert wrote:
> > > > I would like to avoid the Any type here and I hope we can if we don't allow "strings". See also my last comment.
> > > The only possible solution I see here is to convert kind/vendor strings into exprs and store all data as `Expr *`
> > Should we define a struct to be used as variant here maybe? If we only have <5 different types we might not want to go to Any or Expr directly.
> What is the difference between using Any and a struct?
Any is generic (anything).
Having a variant (std::variant or self build struct with 2 constructors) specifies what the components can be.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70739/new/

https://reviews.llvm.org/D70739





More information about the cfe-commits mailing list