mstorsjo created this revision.
mstorsjo added reviewers: labath, aprantl.
Herald added a project: LLDB.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74084
Files:
lldb/source/DataFormatters/FormatCache.cpp
lldb/source/DataFormatters/LanguageCategory.cpp
lldb/source/Interpreter/CommandAlias.cpp
lldb/source/Interpreter/Options.cpp
Index: lldb/source/Interpreter/Options.cpp
===================================================================
--- lldb/source/Interpreter/Options.cpp
+++ lldb/source/Interpreter/Options.cpp
@@ -1061,8 +1061,8 @@
}
if (!option_arg)
option_arg = "<no-argument>";
- option_arg_vector->emplace_back(option_str.GetString(), has_arg,
- option_arg);
+ option_arg_vector->emplace_back(std::string(option_str.GetString()),
+ has_arg, std::string(option_arg));
// Find option in the argument list; also see if it was supposed to take an
// argument and if one was supplied. Remove option (and argument, if
Index: lldb/source/Interpreter/CommandAlias.cpp
===================================================================
--- lldb/source/Interpreter/CommandAlias.cpp
+++ lldb/source/Interpreter/CommandAlias.cpp
@@ -65,7 +65,8 @@
else {
for (auto &entry : args.entries()) {
if (!entry.ref().empty())
- option_arg_vector->emplace_back("<argument>", -1, entry.ref());
+ option_arg_vector->emplace_back(std::string("<argument>"), -1,
+ std::string(entry.ref()));
}
}
}
Index: lldb/source/DataFormatters/LanguageCategory.cpp
===================================================================
--- lldb/source/DataFormatters/LanguageCategory.cpp
+++ lldb/source/DataFormatters/LanguageCategory.cpp
@@ -54,6 +54,8 @@
return result;
}
+namespace lldb_private {
+
/// Explicit instantiations for the three types.
/// \{
template bool
@@ -82,6 +84,8 @@
return m_hardcoded_synthetics;
}
+} // namespace lldb_private
+
template <typename ImplSP>
bool LanguageCategory::GetHardcoded(FormatManager &fmt_mgr,
FormattersMatchData &match_data,
Index: lldb/source/DataFormatters/FormatCache.cpp
===================================================================
--- lldb/source/DataFormatters/FormatCache.cpp
+++ lldb/source/DataFormatters/FormatCache.cpp
@@ -68,6 +68,8 @@
return m_map[type];
}
+namespace lldb_private {
+
template<> bool FormatCache::Entry::IsCached<lldb::TypeFormatImplSP>() {
return IsFormatCached();
}
@@ -78,6 +80,8 @@
return IsSyntheticCached();
}
+} // namespace lldb_private
+
template <typename ImplSP>
bool FormatCache::Get(ConstString type, ImplSP &format_impl_sp) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
Index: lldb/source/Interpreter/Options.cpp
===================================================================
--- lldb/source/Interpreter/Options.cpp
+++ lldb/source/Interpreter/Options.cpp
@@ -1061,8 +1061,8 @@
}
if (!option_arg)
option_arg = "<no-argument>";
- option_arg_vector->emplace_back(option_str.GetString(), has_arg,
- option_arg);
+ option_arg_vector->emplace_back(std::string(option_str.GetString()),
+ has_arg, std::string(option_arg));
// Find option in the argument list; also see if it was supposed to take an
// argument and if one was supplied. Remove option (and argument, if
Index: lldb/source/Interpreter/CommandAlias.cpp
===================================================================
--- lldb/source/Interpreter/CommandAlias.cpp
+++ lldb/source/Interpreter/CommandAlias.cpp
@@ -65,7 +65,8 @@
else {
for (auto &entry : args.entries()) {
if (!entry.ref().empty())
- option_arg_vector->emplace_back("<argument>", -1, entry.ref());
+ option_arg_vector->emplace_back(std::string("<argument>"), -1,
+ std::string(entry.ref()));
}
}
}
Index: lldb/source/DataFormatters/LanguageCategory.cpp
===================================================================
--- lldb/source/DataFormatters/LanguageCategory.cpp
+++ lldb/source/DataFormatters/LanguageCategory.cpp
@@ -54,6 +54,8 @@
return result;
}
+namespace lldb_private {
+
/// Explicit instantiations for the three types.
/// \{
template bool
@@ -82,6 +84,8 @@
return m_hardcoded_synthetics;
}
+} // namespace lldb_private
+
template <typename ImplSP>
bool LanguageCategory::GetHardcoded(FormatManager &fmt_mgr,
FormattersMatchData &match_data,
Index: lldb/source/DataFormatters/FormatCache.cpp
===================================================================
--- lldb/source/DataFormatters/FormatCache.cpp
+++ lldb/source/DataFormatters/FormatCache.cpp
@@ -68,6 +68,8 @@
return m_map[type];
}
+namespace lldb_private {
+
template<> bool FormatCache::Entry::IsCached<lldb::TypeFormatImplSP>() {
return IsFormatCached();
}
@@ -78,6 +80,8 @@
return IsSyntheticCached();
}
+} // namespace lldb_private
+
template <typename ImplSP>
bool FormatCache::Get(ConstString type, ImplSP &format_impl_sp) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits