Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
7 changed files
with
57 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,43 @@ | ||
; RUN: llvm-undname < %s | FileCheck %s | ||
; RUN: llvm-undname --no-calling-convention < %s | FileCheck %s --check-prefix=CHECK-NO-CALLING-CONV | ||
; RUN: llvm-undname --no-return-type < %s | FileCheck %s --check-prefix=CHECK-NO-RETURN | ||
; RUN: llvm-undname --no-access-specifier < %s | FileCheck %s --check-prefix=CHECK-NO-ACCESS | ||
; RUN: llvm-undname --no-member-type < %s | FileCheck %s --check-prefix=CHECK-NO-MEMBER-TYPE | ||
; RUN: llvm-undname --no-calling-convention --no-return-type --no-access-specifier --no-member-type < %s | FileCheck %s --check-prefix=CHECK-NO-ALL | ||
|
||
?func@MyClass@@UEAAHHH@Z | ||
; CHECK: public: virtual int __cdecl MyClass::func(int, int) | ||
; CHECK-NO-CALLING-CONV: public: virtual int MyClass::func(int, int) | ||
; CHECK-NO-RETURN: public: virtual __cdecl MyClass::func(int, int) | ||
; CHECK-NO-ACCESS: {{^}}virtual int __cdecl MyClass::func(int, int) | ||
; CHECK-NO-MEMBER-TYPE: public: int __cdecl MyClass::func(int, int) | ||
; CHECK-NO-ALL: {{^}}MyClass::func(int, int) | ||
; RUN: llvm-undname < %s | FileCheck %s | ||
; RUN: llvm-undname --no-calling-convention < %s | FileCheck %s --check-prefix=CHECK-NO-CALLING-CONV | ||
; RUN: llvm-undname --no-return-type < %s | FileCheck %s --check-prefix=CHECK-NO-RETURN | ||
; RUN: llvm-undname --no-access-specifier < %s | FileCheck %s --check-prefix=CHECK-NO-ACCESS | ||
; RUN: llvm-undname --no-member-type < %s | FileCheck %s --check-prefix=CHECK-NO-MEMBER-TYPE | ||
; RUN: llvm-undname --no-variable-type < %s | FileCheck %s --check-prefix=CHECK-NO-VARIABLE-TYPE | ||
; RUN: llvm-undname --no-calling-convention --no-return-type --no-access-specifier --no-member-type --no-variable-type < %s | FileCheck %s --check-prefix=CHECK-NO-ALL | ||
|
||
?func@MyClass@@UEAAHHH@Z | ||
; CHECK: public: virtual int __cdecl MyClass::func(int, int) | ||
; CHECK-NO-CALLING-CONV: public: virtual int MyClass::func(int, int) | ||
; CHECK-NO-RETURN: public: virtual __cdecl MyClass::func(int, int) | ||
; CHECK-NO-ACCESS: {{^}}virtual int __cdecl MyClass::func(int, int) | ||
; CHECK-NO-MEMBER-TYPE: public: int __cdecl MyClass::func(int, int) | ||
; CHECK-NO-VARIABLE-TYPE: public: virtual int __cdecl MyClass::func(int, int) | ||
; CHECK-NO-ALL: {{^}}MyClass::func(int, int) | ||
|
||
?array2d@@3PAY09HA | ||
; CHECK: int (*array2d)[10] | ||
; CHECK-NO-CALLING-CONV: int (*array2d)[10] | ||
; CHECK-NO-RETURN: int (*array2d)[10] | ||
; CHECK-NO-ACCESS: int (*array2d)[10] | ||
; CHECK-NO-MEMBER-TYPE: int (*array2d)[10] | ||
; CHECK-NO-VARIABLE-TYPE: array2d | ||
; CHECK-NO-ALL: array2d | ||
|
||
?a@abc@@3PAY09HA | ||
; CHECK: int (*abc::a)[10] | ||
; CHECK-NO-CALLING-CONV: int (*abc::a)[10] | ||
; CHECK-NO-RETURN: int (*abc::a)[10] | ||
; CHECK-NO-ACCESS: int (*abc::a)[10] | ||
; CHECK-NO-MEMBER-TYPE: int (*abc::a)[10] | ||
; CHECK-NO-VARIABLE-TYPE: abc::a | ||
; CHECK-NO-ALL: abc::a | ||
|
||
?x@@3PEAEEA | ||
; CHECK: unsigned char *x | ||
; CHECK-NO-CALLING-CONV: unsigned char *x | ||
; CHECK-NO-RETURN: unsigned char *x | ||
; CHECK-NO-ACCESS: unsigned char *x | ||
; CHECK-NO-MEMBER-TYPE: unsigned char *x | ||
; CHECK-NO-VARIABLE-TYPE: x | ||
; CHECK-NO-ALL: x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters