[Lldb-commits] [lldb] [lldb][TypeSynthetic][NFC] Make SyntheticChildrenFrontend::Update() return an enum (PR #80167)
Dave Lee via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 31 10:15:53 PST 2024
================
@@ -49,14 +49,17 @@ class SyntheticChildrenFrontEnd {
virtual size_t GetIndexOfChildWithName(ConstString name) = 0;
- // this function is assumed to always succeed and it if fails, the front-end
- // should know to deal with it in the correct way (most probably, by refusing
- // to return any children) the return value of Update() should actually be
- // interpreted as "ValueObjectSyntheticFilter cache is good/bad" if =true,
- // ValueObjectSyntheticFilter is allowed to use the children it fetched
- // previously and cached if =false, ValueObjectSyntheticFilter must throw
- // away its cache, and query again for children
- virtual bool Update() = 0;
+ enum class CacheState { Invalid, Valid };
----------------
kastiglione wrote:
what do you think about making this a verb rather than a noun? Something along the lines of `CacheAction` with cases `Clear`/`Drop`/`ThrowAway`/etc, and `Keep`/`Preserve`/`Reuse`/etc?
https://github.com/llvm/llvm-project/pull/80167
More information about the lldb-commits
mailing list