[Openmp-commits] [PATCH] D95928: [OpenMP] Delay more diagnostics of potentially non-emitted code

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Feb 15 09:50:01 PST 2021


JonChesterfield added inline comments.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:18345
   if (LangOpts.OpenMPIsDevice) {
+    // In OpenMP device mode we will not emit host only functions, or functions
+    // we don't need due to their linkage.
----------------
What catches a static function whose address is taken?


================
Comment at: clang/lib/Sema/SemaDecl.cpp:18376
+
+  if (Final && LangOpts.OpenMP && !LangOpts.CUDA)
+    return FunctionEmissionStatus::Emitted;
----------------
Does LangOpts.HIP imply LandOpts.CUDA? I think it is intended to. I think I've seen this pattern (is openmp and is not cuda) elsewhere, perhaps we're missing a predicate.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95928



More information about the Openmp-commits mailing list