diff --git a/lldb/include/lldb/Core/FormatNavigator.h b/lldb/include/lldb/Core/FormatNavigator.h index a7390a85275b24704fefa0ba702d318541583a91..99c05c06df34feba7c4953d816cff4ae07ad0c8a 100644 --- a/lldb/include/lldb/Core/FormatNavigator.h +++ b/lldb/include/lldb/Core/FormatNavigator.h @@ -254,9 +254,6 @@ class FormatNavigator protected: typedef FormatMap BackEndType; - template - struct Types { }; - public: typedef typename BackEndType::MapType MapType; typedef typename MapType::iterator MapIterator; @@ -279,13 +276,13 @@ public: void Add (const MapKeyType &type, const MapValueType& entry) { - Add_Impl(type, entry, Types()); + Add_Impl(type, entry, (KeyType*)NULL); } bool Delete (ConstString type) { - return Delete_Impl(type, Types()); + return Delete_Impl(type, (KeyType*)NULL); } bool @@ -309,13 +306,13 @@ public: bool Get (ConstString type, MapValueType& entry) { - return Get_Impl(type, entry, Types()); + return Get_Impl(type, entry, (KeyType*)NULL); } bool GetExact (ConstString type, MapValueType& entry) { - return GetExact_Impl(type, entry, Types()); + return GetExact_Impl(type, entry, (KeyType*)NULL); } MapValueType @@ -327,7 +324,7 @@ public: lldb::TypeNameSpecifierImplSP GetTypeNameSpecifierAtIndex (uint32_t index) { - return GetTypeNameSpecifierAtIndex_Impl(index, Types()); + return GetTypeNameSpecifierAtIndex_Impl(index, (KeyType*)NULL); } void @@ -358,29 +355,25 @@ protected: ConstString m_id_cs; - template void - Add_Impl (const MapKeyType &type, const MapValueType& entry, Types) + Add_Impl (const MapKeyType &type, const MapValueType& entry, lldb::RegularExpressionSP *dummy) { m_format_map.Add(type,entry); } - template - void Add_Impl (const ConstString &type, const MapValueType& entry, Types) + void Add_Impl (const ConstString &type, const MapValueType& entry, ConstString *dummy) { m_format_map.Add(GetValidTypeName_Impl(type), entry); } - template bool - Delete_Impl (ConstString type, Types) + Delete_Impl (ConstString type, ConstString *dummy) { return m_format_map.Delete(type); } - template bool - Delete_Impl (ConstString type, Types) + Delete_Impl (ConstString type, lldb::RegularExpressionSP *dummy) { Mutex& x_mutex = m_format_map.mutex(); lldb_private::Mutex::Locker locker(x_mutex); @@ -399,23 +392,20 @@ protected: return false; } - template bool - Get_Impl (ConstString type, MapValueType& entry, Types) + Get_Impl (ConstString type, MapValueType& entry, ConstString *dummy) { return m_format_map.Get(type, entry); } - template bool - GetExact_Impl (ConstString type, MapValueType& entry, Types dummy) + GetExact_Impl (ConstString type, MapValueType& entry, ConstString *dummy) { - return Get_Impl(type,entry,dummy); + return Get_Impl(type,entry, (KeyType*)0); } - template lldb::TypeNameSpecifierImplSP - GetTypeNameSpecifierAtIndex_Impl (uint32_t index, Types dummy) + GetTypeNameSpecifierAtIndex_Impl (uint32_t index, ConstString *dummy) { ConstString key = m_format_map.GetKeyAtIndex(index); if (key) @@ -425,9 +415,8 @@ protected: return lldb::TypeNameSpecifierImplSP(); } - template lldb::TypeNameSpecifierImplSP - GetTypeNameSpecifierAtIndex_Impl (uint32_t index, Types dummy) + GetTypeNameSpecifierAtIndex_Impl (uint32_t index, lldb::RegularExpressionSP *dummy) { lldb::RegularExpressionSP regex = m_format_map.GetKeyAtIndex(index); if (regex.get() == NULL) @@ -436,9 +425,8 @@ protected: true)); } - template bool - Get_Impl (ConstString key, MapValueType& value, Types) + Get_Impl (ConstString key, MapValueType& value, lldb::RegularExpressionSP *dummy) { Mutex& x_mutex = m_format_map.mutex(); lldb_private::Mutex::Locker locker(x_mutex); @@ -455,9 +443,8 @@ protected: return false; } - template bool - GetExact_Impl (ConstString key, MapValueType& value, Types) + GetExact_Impl (ConstString key, MapValueType& value, lldb::RegularExpressionSP *dummy) { Mutex& x_mutex = m_format_map.mutex(); lldb_private::Mutex::Locker locker(x_mutex);