================
@@ -172,6 +172,31 @@ ScriptInterpreter::GetOpaqueTypeFromSBValue(const
lldb::SBValue &value) const {
return locker.GetLockedSP(*value.m_opaque_sp);
}
+FileSpec ScriptInterpreter::GetOpaqueTypeFromSBFileSpec(
+ const lldb::SBFileSpec &file_spec) const {
+ if (file_spec.m_opaque_up)
+ return *file_spec.m_opaque_up;
+ return {};
+}
+
+ModuleSpec ScriptInterpreter::GetOpaqueTypeFromSBModuleSpec(
+ const lldb::SBModuleSpec &module_spec) const {
+ if (module_spec.m_opaque_up)
+ return *module_spec.m_opaque_up;
+ return {};
+}
----------------
medismailben wrote:
nit: Since `FileSpec` & `ModuleSpec` don't have a `IsValid` method, I'd return
a `std::optional<FileSpec>` & `std::optional<ModuleSpec>` here.
https://github.com/llvm/llvm-project/pull/181334
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits