[clang] [llvm] [openmp]  [OpenMP] Rework handling of global ctor/dtors in OpenMP (PR #71739)
    Joseph Huber via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Thu Nov  9 03:49:07 PST 2023
    
    
  
================
@@ -671,6 +671,20 @@ struct GenericDeviceTy : public DeviceAllocatorTy {
   Error synchronize(__tgt_async_info *AsyncInfo);
   virtual Error synchronizeImpl(__tgt_async_info &AsyncInfo) = 0;
 
+  /// Invokes any global constructors on the device if present and is required
+  /// by the target.
+  virtual Error callGlobalConstructors(GenericPluginTy &Plugin,
+                                       DeviceImageTy &Image) {
+    return Error::success();
----------------
jhuber6 wrote:
This code is in the header above the definition of the `Plugin` class, so we can't use that without a complete reordering.
https://github.com/llvm/llvm-project/pull/71739
    
    
More information about the cfe-commits
mailing list