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
44 lines
1.9 KiB
Plaintext
44 lines
1.9 KiB
Plaintext
; 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
|