[clang] [llvm] [OpenMP][clang] Register Vtables on device for indirect calls (PR #159856)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 22 12:51:17 PDT 2025


================
@@ -9955,6 +10070,19 @@ void CGOpenMPRuntime::scanForTargetRegionsFunctions(const Stmt *S,
   if (!S)
     return;
 
+  // Register vtable from device for target data and target directives.
+  // Add this block here since scanForTargetRegionsFunctions ignores
+  // target data by checking if S is a executable directive (target).
+    if (isa<OMPExecutableDirective>(S) &&
+        isOpenMPTargetDataManagementDirective(
+            cast<OMPExecutableDirective>(S)->getDirectiveKind())) {
----------------
Jason-VanBeusekom wrote:

Fixed in https://github.com/llvm/llvm-project/commit/3cd3157cd806df78a071bf294fd9cc653dc60298

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


More information about the llvm-commits mailing list