[Lldb-commits] [lldb] r195254 - Fix MSVC build

Colin Riley colin at codeplay.com
Wed Nov 20 07:19:08 PST 2013


Author: domipheus
Date: Wed Nov 20 09:19:08 2013
New Revision: 195254

URL: http://llvm.org/viewvc/llvm-project?rev=195254&view=rev
Log:
Fix MSVC build

The demangler added in r193708 from cxa_demangle.cpp uses language features which are not supported by the latest visual studio. In order to preserve the msvc build, this patch restores the previous (non)functionality in windows under msvc by disabling the demangler. 

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

Modified: lldb/trunk/source/Core/Mangled.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Mangled.cpp?rev=195254&r1=195253&r2=195254&view=diff
==============================================================================
--- lldb/trunk/source/Core/Mangled.cpp (original)
+++ lldb/trunk/source/Core/Mangled.cpp Wed Nov 20 09:19:08 2013
@@ -10,7 +10,9 @@
 
 // FreeBSD9-STABLE requires this to know about size_t in cxxabi.h
 #include <cstddef>
-#if defined(_MSC_VER) || defined (__FreeBSD__)
+#if defined(_MSC_VER) 
+// Cannot enable the builtin demangler on msvc as it does not support the cpp11 within the implementation.
+#elif defined (__FreeBSD__)
 #define LLDB_USE_BUILTIN_DEMANGLER
 #else
 #include <cxxabi.h>
@@ -4890,6 +4892,9 @@ Mangled::GetDemangledName () const
                 // add it to our map.
 #ifdef LLDB_USE_BUILTIN_DEMANGLER
                 char *demangled_name = __cxa_demangle (mangled_cstr, NULL, NULL, NULL);
+#elif defined(_MSC_VER)
+                // Cannot demangle on msvc.
+                char *demangled_name = nullptr;
 #else
                 char *demangled_name = abi::__cxa_demangle (mangled_cstr, NULL, NULL, NULL);
 #endif





More information about the lldb-commits mailing list