[Lldb-commits] [PATCH] D43059: Recognize MSVC style mangling in CPlusPlusLanguage::IsCPPMangledName

Aaron Smith via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 8 15:16:02 PST 2018


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL324672: Recognize MSVC style mangling in CPlusPlusLanguage::IsCPPMangledName (authored by asmith, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D43059?vs=133489&id=133503#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D43059

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


Index: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
===================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
@@ -251,13 +251,17 @@
 }
 
 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(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43059.133503.patch
Type: text/x-patch
Size: 1043 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180208/2ba7b299/attachment-0001.bin>


More information about the lldb-commits mailing list