[flang-commits] [flang] [Flang][MLIR][OpenMP] Create a deferred declare target marking process for Bridge.cpp (PR #78502)

via flang-commits flang-commits at lists.llvm.org
Thu Feb 22 09:25:29 PST 2024


================
@@ -5057,6 +5068,13 @@ class FirConverter : public Fortran::lower::AbstractConverter {
   /// intended for device offloading has been detected
   bool ompDeviceCodeFound = false;
 
+  /// Keeps track of symbols defined as declare target that could not be
+  /// processed at the time of lowering the declare target construct, such
+  /// as certain cases where interfaces are declared but not defined within
+  /// a module.
+  llvm::SmallVector<Fortran::lower::OMPDeferredDeclTarInfo, 2>
----------------
agozillon wrote:

Will do it as part of this PR as it's a small change and makes swapping the contents of this patch to a ref a little simpler (we get the symbol from the pair, which isn't a problem when taking a copy, but is if we take a ref currently as I believe the copy in the pair falls out of scope before we process the deferred values, swapping both to ref means we're pointing at the original which persists to and past when we require it)

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


More information about the flang-commits mailing list