[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 14:33:23 PST 2018


asmith updated this revision to Diff 133489.
asmith retitled this revision from "Add implementation for MSVC in CPlusPlusLanguage::IsCPPMangledName" to "Recognize MSVC style mangling in CPlusPlusLanguage::IsCPPMangledName".

https://reviews.llvm.org/D43059

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


Index: source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
===================================================================
--- source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+++ 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.133489.patch
Type: text/x-patch
Size: 1010 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180208/7e295c73/attachment.bin>


More information about the lldb-commits mailing list