summaryrefslogtreecommitdiff
path: root/src/buildtool/build_engine/expression/expression.hpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2022-06-15 15:45:24 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2022-06-20 16:54:03 +0200
commitd9e35f9d82acbc661aca0cb5608e052434e52dc8 (patch)
tree6f375e33245314f176c5fb007a8ec492df727410 /src/buildtool/build_engine/expression/expression.hpp
parent74dc83943b6100551afc3b66fa21ac7b16175f13 (diff)
downloadjustbuild-d9e35f9d82acbc661aca0cb5608e052434e52dc8.tar.gz
expression: cache the cacheability property
Diffstat (limited to 'src/buildtool/build_engine/expression/expression.hpp')
-rw-r--r--src/buildtool/build_engine/expression/expression.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buildtool/build_engine/expression/expression.hpp b/src/buildtool/build_engine/expression/expression.hpp
index 047089d2..68dddb10 100644
--- a/src/buildtool/build_engine/expression/expression.hpp
+++ b/src/buildtool/build_engine/expression/expression.hpp
@@ -242,6 +242,7 @@ class Expression {
data_{none_t{}};
AtomicValue<std::string> hash_{};
+ AtomicValue<bool> is_cachable_{};
template <class T, std::size_t kIndex = 0>
requires(IsValidType<T>()) [[nodiscard]] static consteval auto GetIndexOf()
@@ -325,6 +326,7 @@ class Expression {
[[nodiscard]] auto TypeStringForIndex() const noexcept -> std::string;
[[nodiscard]] auto TypeString() const noexcept -> std::string;
[[nodiscard]] auto ComputeHash() const noexcept -> std::string;
+ [[nodiscard]] auto ComputeIsCacheable() const -> bool;
};
namespace std {