void
SetValue (const ConstString &name);
+ //----------------------------------------------------------------------
+ /// Get the language only if it is definitive what the language is from
+ /// the mangling.
+ ///
+ /// For a mangled name to have a language it must have both a mangled
+ /// and a demangled name and it must be definitive from the mangling
+ /// what the language is.
+ ///
+ /// Standard C function names will return eLanguageTypeUnknown because
+ /// they aren't mangled and it isn't clear what language the name
+ /// represents (there will be no mangled name).
+ ///
+ /// @return
+ /// The language for the mangled/demangled name, eLanguageTypeUnknown
+ /// if there is no mangled or demangled counterpart.
+ //----------------------------------------------------------------------
+ lldb::LanguageType
+ GetLanguage ();
+
private:
//----------------------------------------------------------------------
/// Mangled member variables.
return m_mangled.MemorySize() + m_demangled.MemorySize();
}
+lldb::LanguageType
+Mangled::GetLanguage ()
+{
+ ConstString mangled = GetMangledName();
+ if (mangled)
+ {
+ if (GetDemangledName())
+ {
+ if (cstring_is_mangled(mangled.GetCString()))
+ return lldb::eLanguageTypeC_plus_plus;
+ }
+ }
+ return lldb::eLanguageTypeUnknown;
+}
+
//----------------------------------------------------------------------
// Dump OBJ to the supplied stream S.
//----------------------------------------------------------------------