summaryrefslogtreecommitdiff
path: root/flang/include
diff options
context:
space:
mode:
authorSlava Zakharin <szakharin@nvidia.com>2023-05-15 21:10:18 -0700
committerSlava Zakharin <szakharin@nvidia.com>2023-05-16 09:51:09 -0700
commite47fbb7cd2d22b787d1022fd2f3bef4a051d67c8 (patch)
tree389fc882117d77a92c286740ab2ac5cb2e1a9ca5 /flang/include
parent76941b68ecd9a1f9ca337774b4082c2ca7577450 (diff)
downloadllvm-e47fbb7cd2d22b787d1022fd2f3bef4a051d67c8.tar.gz
[flang] Fixed comparison for derived types constants.
The two constants should be equal only if their derived types are the same. This fixes regression caused by D150380. Differential Revision: https://reviews.llvm.org/D150634
Diffstat (limited to 'flang/include')
-rw-r--r--flang/include/flang/Evaluate/constant.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/flang/include/flang/Evaluate/constant.h b/flang/include/flang/Evaluate/constant.h
index 611ee7772d2a..73e4271cc28a 100644
--- a/flang/include/flang/Evaluate/constant.h
+++ b/flang/include/flang/Evaluate/constant.h
@@ -225,6 +225,7 @@ public:
std::optional<StructureConstructor> GetScalarValue() const;
StructureConstructor At(const ConstantSubscripts &) const;
+ bool operator==(const Constant &) const;
Constant Reshape(ConstantSubscripts &&) const;
std::size_t CopyFrom(const Constant &source, std::size_t count,
ConstantSubscripts &resultSubscripts, const std::vector<int> *dimOrder);