mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[Demangle] Support demangling Swift calling convention in MS demangler.
Previously, Clang was able to mangle the Swift calling convention but 'MicrosoftDemangle.cpp' was not able to demangle it. Reviewed By: compnerd, rnk Differential Revision: https://reviews.llvm.org/D95053
This commit is contained in:
parent
4d950d6390
commit
52a271678f
@ -67,6 +67,7 @@ enum class CallingConv : uint8_t {
|
||||
Eabi,
|
||||
Vectorcall,
|
||||
Regcall,
|
||||
Swift, // Clang-only
|
||||
};
|
||||
|
||||
enum class ReferenceKind : uint8_t { None, LValueRef, RValueRef };
|
||||
|
@ -1711,6 +1711,8 @@ CallingConv Demangler::demangleCallingConvention(StringView &MangledName) {
|
||||
return CallingConv::Eabi;
|
||||
case 'Q':
|
||||
return CallingConv::Vectorcall;
|
||||
case 'S':
|
||||
return CallingConv::Swift;
|
||||
}
|
||||
|
||||
return CallingConv::None;
|
||||
|
@ -107,6 +107,9 @@ static void outputCallingConvention(OutputStream &OS, CallingConv CC) {
|
||||
case CallingConv::Clrcall:
|
||||
OS << "__clrcall";
|
||||
break;
|
||||
case CallingConv::Swift:
|
||||
OS << "__attribute__((__swiftcall__)) ";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -338,6 +338,9 @@
|
||||
?vector_func@@YQXXZ
|
||||
; CHECK: void __vectorcall vector_func(void)
|
||||
|
||||
?swift_func@@YSXXZ
|
||||
; CHECK: void __attribute__((__swiftcall__)) swift_func(void)
|
||||
|
||||
??$fn_tmpl@$1?extern_c_func@@YAXXZ@@YAXXZ
|
||||
; CHECK: void __cdecl fn_tmpl<&void __cdecl extern_c_func(void)>(void)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user