Update comment for __cxa_demangle.
llvm-svn: 257678
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index 1c5cae1..22ec91f 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -146,7 +146,10 @@
if (!Config->Demangle)
return Name;
- // Return if it does not look like a C++ symbol.
+ // Don't call __cxa_demangle if the name does not look like a C++
+ // symbol name. We need this check because some implementations of the
+ // function try to demangle a name as something different (e.g. type name)
+ // if it is not a mangled symbol name.
if (!Name.startswith("_Z"))
return Name;