[LLDB] Fix compilation with GCC 5

Differential Revision: https://reviews.llvm.org/D74084
This commit is contained in:
Martin Storsjö 2020-02-05 22:29:59 +02:00
parent 6bfc45cf60
commit 5bbaf54358
4 changed files with 12 additions and 3 deletions

View File

@ -68,6 +68,8 @@ FormatCache::Entry &FormatCache::GetEntry(ConstString type) {
return m_map[type];
}
namespace lldb_private {
template<> bool FormatCache::Entry::IsCached<lldb::TypeFormatImplSP>() {
return IsFormatCached();
}
@ -78,6 +80,8 @@ template<> bool FormatCache::Entry::IsCached<lldb::SyntheticChildrenSP>() {
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);

View File

@ -54,6 +54,8 @@ bool LanguageCategory::Get(FormattersMatchData &match_data,
return result;
}
namespace lldb_private {
/// Explicit instantiations for the three types.
/// \{
template bool
@ -82,6 +84,8 @@ auto &LanguageCategory::GetHardcodedFinder<lldb::SyntheticChildrenSP>() {
return m_hardcoded_synthetics;
}
} // namespace lldb_private
template <typename ImplSP>
bool LanguageCategory::GetHardcoded(FormatManager &fmt_mgr,
FormattersMatchData &match_data,

View File

@ -65,7 +65,8 @@ static bool ProcessAliasOptionsArgs(lldb::CommandObjectSP &cmd_obj_sp,
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()));
}
}
}

View File

@ -1061,8 +1061,8 @@ llvm::Expected<Args> Options::ParseAlias(const Args &args,
}
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