================
@@ -103,3 +146,89 @@ lldb::SBValue Variables::FindVariable(uint64_t
variablesReference,
}
return variable;
}
+
+std::optional<ScopeData>
+Variables::GetScopeKind(const int64_t variablesReference) {
+ auto scope_kind_iter = m_scope_kinds.find(variablesReference);
+ if (scope_kind_iter == m_scope_kinds.end()) {
+ return std::nullopt;
+ }
+
+ auto scope_iter = m_frames.find(scope_kind_iter->second.second);
+ if (scope_iter == m_frames.end()) {
+ return std::nullopt;
----------------
da-viper wrote:
```suggestion
auto frames_iter = m_frames.find(scope_kind_iter->second.second);
if (frames_iter == m_frames.end()) {
return std::nullopt;
```
update the usages
https://github.com/llvm/llvm-project/pull/124232
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits