[Lldb-commits] [lldb] r240662 - Rename Mangled::GetLanguage to Mangled::GuessLanguage

Dawn Perchik dawn at burble.org
Thu Jun 25 10:45:53 PDT 2015


Author: dperchik
Date: Thu Jun 25 12:45:53 2015
New Revision: 240662

URL: http://llvm.org/viewvc/llvm-project?rev=240662&view=rev
Log:
Rename Mangled::GetLanguage to Mangled::GuessLanguage

The language can not be definitively determined from the mangling, so
this new name helps clarify that fact.  This addresses the concerns raised
in http://reviews.llvm.org/rL226962.
Reviewed by: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10723

Modified:
    lldb/trunk/include/lldb/Core/Mangled.h
    lldb/trunk/source/Core/Mangled.cpp

Modified: lldb/trunk/include/lldb/Core/Mangled.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Mangled.h?rev=240662&r1=240661&r2=240662&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Mangled.h (original)
+++ lldb/trunk/include/lldb/Core/Mangled.h Thu Jun 25 12:45:53 2015
@@ -298,12 +298,12 @@ public:
     SetValue (const ConstString &name);
 
     //----------------------------------------------------------------------
-    /// Get the language only if it is definitive what the language is from
-    /// the mangling.
+    /// Try to guess the language 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.
+    /// and a demangled name and it can be guessed from the mangling what
+    /// the language is.  Note: this will return C++ for any language that
+    /// uses Itanium ABI mangling.
     ///
     /// Standard C function names will return eLanguageTypeUnknown because
     /// they aren't mangled and it isn't clear what language the name
@@ -314,7 +314,7 @@ public:
     ///     if there is no mangled or demangled counterpart.
     //----------------------------------------------------------------------
     lldb::LanguageType
-    GetLanguage ();
+    GuessLanguage ();
 
 private:
     //----------------------------------------------------------------------

Modified: lldb/trunk/source/Core/Mangled.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Mangled.cpp?rev=240662&r1=240661&r2=240662&view=diff
==============================================================================
--- lldb/trunk/source/Core/Mangled.cpp (original)
+++ lldb/trunk/source/Core/Mangled.cpp Thu Jun 25 12:45:53 2015
@@ -423,7 +423,7 @@ Mangled::MemorySize () const
 }
 
 lldb::LanguageType
-Mangled::GetLanguage ()
+Mangled::GuessLanguage ()
 {
     ConstString mangled = GetMangledName();
     if (mangled)





More information about the lldb-commits mailing list