[flang-commits] [flang] 535cbe0 - [flang] Provide access to constant character array data
peter klausler via flang-commits
flang-commits at lists.llvm.org
Wed May 5 16:57:01 PDT 2021
Author: peter klausler
Date: 2021-05-05T16:56:00-07:00
New Revision: 535cbe02a4543ca930e79c10b5d334580428e607
URL: https://github.com/llvm/llvm-project/commit/535cbe02a4543ca930e79c10b5d334580428e607
DIFF: https://github.com/llvm/llvm-project/commit/535cbe02a4543ca930e79c10b5d334580428e607.diff
LOG: [flang] Provide access to constant character array data
Allow direct access to constant character array data (for creating a hash ID of a constant).
Differential Revision: https://reviews.llvm.org/D101208
Added:
Modified:
flang/include/flang/Evaluate/constant.h
Removed:
################################################################################
diff --git a/flang/include/flang/Evaluate/constant.h b/flang/include/flang/Evaluate/constant.h
index d5f7db8be45d1..ea89e4ee2ee23 100644
--- a/flang/include/flang/Evaluate/constant.h
+++ b/flang/include/flang/Evaluate/constant.h
@@ -168,6 +168,7 @@ class Constant<Type<TypeCategory::Character, KIND>> : public ConstantBounds {
bool empty() const;
std::size_t size() const;
+ const Scalar<Result> &values() const { return values_; }
ConstantSubscript LEN() const { return length_; }
std::optional<Scalar<Result>> GetScalarValue() const {
More information about the flang-commits
mailing list