[Lldb-commits] [lldb] r324672 - Recognize MSVC style mangling in CPlusPlusLanguage::IsCPPMangledName

Aaron Smith via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 8 15:11:56 PST 2018


Author: asmith
Date: Thu Feb  8 15:11:56 2018
New Revision: 324672

URL: http://llvm.org/viewvc/llvm-project?rev=324672&view=rev
Log:
Recognize MSVC style mangling in CPlusPlusLanguage::IsCPPMangledName

Reviewers: zturner, lldb-commits, labath

Reviewed By: zturner

Subscribers: jingham, labath, davide, llvm-commits

Differential Revision: https://reviews.llvm.org/D43059

Modified:
    lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp

Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp?rev=324672&r1=324671&r2=324672&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp Thu Feb  8 15:11:56 2018
@@ -251,13 +251,17 @@ std::string CPlusPlusLanguage::MethodNam
 }
 
 bool CPlusPlusLanguage::IsCPPMangledName(const char *name) {
-  // FIXME, we should really run through all the known C++ Language plugins and
-  // ask each one if
-  // this is a C++ mangled name, but we can put that off till there is actually
-  // more than one
-  // we care about.
-
-  return (name != nullptr && name[0] == '_' && name[1] == 'Z');
+  // FIXME!! we should really run through all the known C++ Language
+  // plugins and ask each one if this is a C++ mangled name
+  
+  if (name == nullptr)
+    return false;
+  
+  // MSVC style mangling 
+  if (name[0] == '?')
+    return true;
+  
+  return (name[0] != '\0' && name[0] == '_' && name[1] == 'Z');
 }
 
 bool CPlusPlusLanguage::ExtractContextAndIdentifier(




More information about the lldb-commits mailing list