[cfe-commits] r123379 - in /cfe/trunk: lib/CodeGen/Mangle.cpp test/CodeGenCXX/mangle-variadic-templates.cpp
Douglas Gregor
dgregor at apple.com
Thu Jan 13 09:44:36 PST 2011
Author: dgregor
Date: Thu Jan 13 11:44:36 2011
New Revision: 123379
URL: http://llvm.org/viewvc/llvm-project?rev=123379&view=rev
Log:
When your comments and your code are out-of-sync, the test case is wrong.
Modified:
cfe/trunk/lib/CodeGen/Mangle.cpp
cfe/trunk/test/CodeGenCXX/mangle-variadic-templates.cpp
Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=123379&r1=123378&r2=123379&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Thu Jan 13 11:44:36 2011
@@ -1477,7 +1477,7 @@
void CXXNameMangler::mangleType(const PackExpansionType *T) {
// <type> ::= Dp <type> # pack expansion (C++0x)
- Out << "sp";
+ Out << "Dp";
mangleType(T->getPattern());
}
Modified: cfe/trunk/test/CodeGenCXX/mangle-variadic-templates.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle-variadic-templates.cpp?rev=123379&r1=123378&r2=123379&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-variadic-templates.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle-variadic-templates.cpp Thu Jan 13 11:44:36 2011
@@ -9,13 +9,13 @@
template<int ...Values> struct int_tuple { };
template<template<typename> class ...Templates> struct template_tuple { };
-// CHECK: define weak_odr void @_Z2f0IJEEv1XIXsZT_EJspRT_EE
+// CHECK: define weak_odr void @_Z2f0IJEEv1XIXsZT_EJDpRT_EE
template<typename ...Types>
void f0(X<sizeof...(Types), Types&...>) { }
template void f0(X<0>);
-// CHECK: define weak_odr void @_Z2f0IJifdEEv1XIXsZT_EJspRT_EE
+// CHECK: define weak_odr void @_Z2f0IJifdEEv1XIXsZT_EJDpRT_EE
template void f0<int, float, double>(X<3, int&, float&, double&>);
// Mangling for template argument packs
@@ -29,30 +29,30 @@
// Mangling function parameter packs
template<typename ...Types> void f2(Types...) {}
-// CHECK: define weak_odr void @_Z2f2IJEEvspT_
+// CHECK: define weak_odr void @_Z2f2IJEEvDpT_
template void f2<>();
-// CHECK: define weak_odr void @_Z2f2IJiEEvspT_
+// CHECK: define weak_odr void @_Z2f2IJiEEvDpT_
template void f2<int>(int);
-// CHECK: define weak_odr void @_Z2f2IJifEEvspT_
+// CHECK: define weak_odr void @_Z2f2IJifEEvDpT_
template void f2<int, float>(int, float);
// Mangling non-trivial function parameter packs
template<typename ...Types> void f3(const Types *...) {}
-// CHECK: define weak_odr void @_Z2f3IJEEvspPKT_
+// CHECK: define weak_odr void @_Z2f3IJEEvDpPKT_
template void f3<>();
-// CHECK: define weak_odr void @_Z2f3IJiEEvspPKT_
+// CHECK: define weak_odr void @_Z2f3IJiEEvDpPKT_
template void f3<int>(const int*);
-// CHECK: define weak_odr void @_Z2f3IJifEEvspPKT_
+// CHECK: define weak_odr void @_Z2f3IJifEEvDpPKT_
template void f3<int, float>(const int*, const float*);
// Mangling of type pack expansions in a template argument
template<typename ...Types> tuple<Types...> f4() {}
-// CHECK: define weak_odr void @_Z2f4IJifdEE5tupleIJspT_EEv
+// CHECK: define weak_odr void @_Z2f4IJifdEE5tupleIJDpT_EEv
template tuple<int, float, double> f4();
// Mangling of type pack expansions in a function type
template<typename R, typename ...ArgTypes> identity<R(ArgTypes...)> f5() {}
-// CHECK: define weak_odr void @_Z2f5IiJifdEE8identityIFT_spT0_EEv
+// CHECK: define weak_odr void @_Z2f5IiJifdEE8identityIFT_DpT0_EEv
template identity<int(int, float, double)> f5();
// Mangling of non-type template argument expansions
More information about the cfe-commits
mailing list