Skip to content

Commit

Permalink
[LLDB] Fix compilation with GCC 5
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D74084

(cherry picked from commit 5bbaf54)
  • Loading branch information
mstorsjo authored and zmodem committed Feb 6, 2020
1 parent cbec01f commit 22633f8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions lldb/source/DataFormatters/FormatCache.cpp
Expand Up @@ -69,6 +69,8 @@ FormatCache::Entry &FormatCache::GetEntry(ConstString type) {
return m_map[type];
}

namespace lldb_private {

template<> bool FormatCache::Entry::IsCached<lldb::TypeFormatImplSP>() {
return IsFormatCached();
}
Expand All @@ -79,6 +81,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);
Expand Down
4 changes: 4 additions & 0 deletions lldb/source/DataFormatters/LanguageCategory.cpp
Expand Up @@ -55,6 +55,8 @@ bool LanguageCategory::Get(FormattersMatchData &match_data,
return result;
}

namespace lldb_private {

/// Explicit instantiations for the three types.
/// \{
template bool
Expand Down Expand Up @@ -83,6 +85,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,
Expand Down
3 changes: 2 additions & 1 deletion lldb/source/Interpreter/CommandAlias.cpp
Expand Up @@ -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()));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions lldb/source/Interpreter/Options.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 22633f8

Please sign in to comment.