Skip to content

Conversation

@kparzysz
Copy link
Contributor

The template itself was not defined anywhere. The closest thing was a forward declaration in flang/include/flang/Evaluate/variable.h.

The template itself was not defined anywhere. The closest thing was
a forward declaration in flang/include/flang/Evaluate/variable.h.
@kparzysz kparzysz requested review from jeanPerier and klausler March 24, 2025 18:47
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir flang:semantics labels Mar 24, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 24, 2025

@llvm/pr-subscribers-flang-semantics

@llvm/pr-subscribers-flang-fir-hlfir

Author: Krzysztof Parzyszek (kparzysz)

Changes

The template itself was not defined anywhere. The closest thing was a forward declaration in flang/include/flang/Evaluate/variable.h.


Full diff: https://github.com/llvm/llvm-project/pull/132805.diff

4 Files Affected:

  • (modified) flang/include/flang/Evaluate/traverse.h (-3)
  • (modified) flang/include/flang/Evaluate/variable.h (-1)
  • (modified) flang/include/flang/Semantics/dump-expr.h (-5)
  • (modified) flang/lib/Lower/IterationSpace.cpp (-4)
diff --git a/flang/include/flang/Evaluate/traverse.h b/flang/include/flang/Evaluate/traverse.h
index dd38d64bff63f..9bb677e515372 100644
--- a/flang/include/flang/Evaluate/traverse.h
+++ b/flang/include/flang/Evaluate/traverse.h
@@ -159,9 +159,6 @@ class Traverse {
   template <typename T> Result operator()(const Designator<T> &x) const {
     return visitor_(x.u);
   }
-  template <typename T> Result operator()(const Variable<T> &x) const {
-    return visitor_(x.u);
-  }
   Result operator()(const DescriptorInquiry &x) const {
     return visitor_(x.base());
   }
diff --git a/flang/include/flang/Evaluate/variable.h b/flang/include/flang/Evaluate/variable.h
index 9b597d29813da..7f1518fd26e78 100644
--- a/flang/include/flang/Evaluate/variable.h
+++ b/flang/include/flang/Evaluate/variable.h
@@ -44,7 +44,6 @@ using SymbolVector = std::vector<SymbolRef>;
 
 // Forward declarations
 struct DataRef;
-template <typename T> struct Variable;
 
 // Reference a base object in memory.  This can be a Fortran symbol,
 // static data (e.g., CHARACTER literal), or compiler-created temporary.
diff --git a/flang/include/flang/Semantics/dump-expr.h b/flang/include/flang/Semantics/dump-expr.h
index 54c41300ecf36..2f445429a10b5 100644
--- a/flang/include/flang/Semantics/dump-expr.h
+++ b/flang/include/flang/Semantics/dump-expr.h
@@ -106,11 +106,6 @@ class DumpEvaluateExpr {
     Show(x.u);
     Outdent();
   }
-  template <typename T> void Show(const evaluate::Variable<T> &x) {
-    Indent("variable");
-    Show(x.u);
-    Outdent();
-  }
   void Show(const evaluate::DescriptorInquiry &x);
   void Show(const evaluate::SpecificIntrinsic &);
   void Show(const evaluate::ProcedureDesignator &x);
diff --git a/flang/lib/Lower/IterationSpace.cpp b/flang/lib/Lower/IterationSpace.cpp
index b011b3ab9a248..203fec508f795 100644
--- a/flang/lib/Lower/IterationSpace.cpp
+++ b/flang/lib/Lower/IterationSpace.cpp
@@ -165,10 +165,6 @@ class ArrayBaseFinder {
   RT find(const Fortran::evaluate::Designator<T> &x) {
     return find(x.u);
   }
-  template <typename T>
-  RT find(const Fortran::evaluate::Variable<T> &x) {
-    return find(x.u);
-  }
   RT find(const Fortran::evaluate::DescriptorInquiry &) { return {}; }
   RT find(const Fortran::evaluate::SpecificIntrinsic &) { return {}; }
   RT find(const Fortran::evaluate::ProcedureDesignator &x) { return {}; }

@kparzysz kparzysz merged commit c221d64 into llvm:main Mar 24, 2025
15 checks passed
@kparzysz kparzysz deleted the users/kparzysz/delete-variable branch March 24, 2025 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang:fir-hlfir flang:semantics flang Flang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants