[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

Gheorghe-Teodor Bercea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 16 12:55:32 PST 2022


doru1004 added inline comments.


================
Comment at: clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:16
+#pragma omp declare target enter(fun2) device_type(nohost)
+#pragma omp declare variant(host_function) match(device={kind(host)})
+void fun2() {}
----------------
ABataev wrote:
> You mean this test case? But it still has kind(host).
The condition checks the attribute of the `host_function` which in this case is `host`. In the test above the condition is false because the `not_a_host_function` has a `nohost` attribute.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140155



More information about the cfe-commits mailing list