[Openmp-commits] [clang] [llvm] [openmp] [OpenMP][clang] Indirect and Virtual function call mapping from host to device (PR #159857)

Alexey Bataev via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 27 09:27:07 PST 2026


================
@@ -7360,8 +7360,14 @@ ExprResult SemaOpenMP::ActOnOpenMPCall(ExprResult Call, Scope *Scope,
     return Call;
 
   FunctionDecl *CalleeFnDecl = CE->getDirectCallee();
-  if (!CalleeFnDecl)
+
+  // Mark indirect calls inside target regions, to allow for insertion of
+  // __llvm_omp_indirect_call_lookup calls during codegen.
+  if (!CalleeFnDecl) {
+    if (isInOpenMPTargetExecutionDirective())
+      getASTContext().OMPTargetCalls.insert(CE);
----------------
alexey-bataev wrote:

check some of nvptx_ tests in clang/test/OpenMP/

https://github.com/llvm/llvm-project/pull/159857


More information about the Openmp-commits mailing list