aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Demangle/MicrosoftDemangle.cpp
diff options
context:
space:
mode:
authorLasse Folger <lassefolger@google.com>2021-10-19 12:03:19 +0200
committerAndy Yankovsky <werat@google.com>2021-10-19 12:04:37 +0200
commit134e1817f62c08cde1ed1f7e94e51425536085ac (patch)
tree6541793493603301a5c6081c45bff8033d69fde1 /llvm/lib/Demangle/MicrosoftDemangle.cpp
parentcfaa5c344d5bc73aae0ec39d57d98acf7463fccf (diff)
downloadllvm-134e1817f62c08cde1ed1f7e94e51425536085ac.zip
llvm-134e1817f62c08cde1ed1f7e94e51425536085ac.tar.gz
llvm-134e1817f62c08cde1ed1f7e94e51425536085ac.tar.bz2
[lldb] change name demangling to be consistent between windows and linx
When printing names in lldb on windows these names contain the full type information while on linux only the name is contained. This change introduces a flag in the Microsoft demangler to control if the type information should be included. With the flag enabled demangled name contains only the qualified name, e.g: without flag -> with flag int (*array2d)[10] -> array2d int (*abc::array2d)[10] -> abc::array2d const int *x -> x For globals there is a second inconsistency which is not yet addressed by this change. On linux globals (in global namespace) are prefixed with :: while on windows they are not. Reviewed By: teemperor, rnk Differential Revision: https://reviews.llvm.org/D111715
Diffstat (limited to 'llvm/lib/Demangle/MicrosoftDemangle.cpp')
-rw-r--r--llvm/lib/Demangle/MicrosoftDemangle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Demangle/MicrosoftDemangle.cpp b/llvm/lib/Demangle/MicrosoftDemangle.cpp
index 30320717..15d7056 100644
--- a/llvm/lib/Demangle/MicrosoftDemangle.cpp
+++ b/llvm/lib/Demangle/MicrosoftDemangle.cpp
@@ -2361,6 +2361,8 @@ char *llvm::microsoftDemangle(const char *MangledName, size_t *NMangled,
OF = OutputFlags(OF | OF_NoReturnType);
if (Flags & MSDF_NoMemberType)
OF = OutputFlags(OF | OF_NoMemberType);
+ if (Flags & MSDF_NoVariableType)
+ OF = OutputFlags(OF | OF_NoVariableType);
int InternalStatus = demangle_success;
if (D.Error)