bool SBTypeCategory::AddTypeFormat(SBTypeNameSpecifier type_name, SBTypeFormat format) { LLDB_RECORD_METHOD(bool, SBTypeCategory, AddTypeFormat, (lldb::SBTypeNameSpecifier, lldb::SBTypeFormat), type_name, format); if (!IsValid()) return false; if (!type_name.IsValid()) return false; if (!format.IsValid()) return false; if (type_name.IsRegex()) m_opaque_sp->GetRegexTypeFormatsContainer()->Add( lldb::RegularExpressionSP(new RegularExpression( llvm::StringRef::withNullAsEmpty(type_name.GetName()))), format.GetSP()); else m_opaque_sp->GetTypeFormatsContainer()->Add( ConstString(type_name.GetName()), format.GetSP()); return true; }
bool SBTypeCategory::AddTypeFormat (SBTypeNameSpecifier type_name, SBTypeFormat format) { if (!IsValid()) return false; if (!type_name.IsValid()) return false; if (!format.IsValid()) return false; if (type_name.IsRegex()) m_opaque_sp->GetRegexValueNavigator()->Add(lldb::RegularExpressionSP(new RegularExpression(type_name.GetName())), format.GetSP()); else m_opaque_sp->GetValueNavigator()->Add(ConstString(type_name.GetName()), format.GetSP()); return true; }