llvm.org GIT mirror llvm / 5249baa
[MS Demangler] Print template constructor args. Previously if you had something like this: template<typename T> struct Foo { template<typename U> Foo(U); }; Foo F(3.7); this would mangle as ??$?0N@?$Foo@H@@QEAA@N@Z and this would be demangled as: undname: __cdecl Foo<int>::Foo<int><double>(double) llvm-undname: __cdecl Foo<int>::Foo<int>(double) Note the lack of the constructor template parameter in our demangling. This patch makes it so we print the constructor argument list. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340356 91177308-0d34-0410-b5e6-96231b3b80d8 Zachary Turner 1 year, 1 month ago
2 changed file(s) with 16 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
968968 OS << "~";
969969 LLVM_FALLTHROUGH;
970970 case OperatorTy::Ctor:
971 // Output the class name with template arguments a second time.
971972 outputNameComponent(OS, *Previous);
973
974 // Structors don't have a name, so outputting the name here actually is a
975 // no-op. But for template constructors, it needs to output the template
976 // argument list. e.g.
977 //
978 // template
979 // struct Foo {
980 // template
981 // Foo(U);
982 // };
983 // should demangle as -- for example -- Foo(double);
984 outputNameComponent(OS, *TheName);
972985 break;
973986 case OperatorTy::Conversion:
974987 OS << "operator";
195195
196196 ??$f@US@@$1?g@1@QEAAXXZ@@YAXXZ
197197 ; CHECK: void __cdecl f(void)
198
199 ??$?0N@?$Foo@H@@QEAA@N@Z
200 ; CHECK: __cdecl Foo::Foo(double)