зеркало из https://github.com/microsoft/clang-1.git
Substitute unscoped template names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82119 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
6793966aa2
Коммит
03c9d530db
|
@ -276,7 +276,11 @@ void CXXNameMangler::mangleUnscopedName(const NamedDecl *ND) {
|
|||
void CXXNameMangler::mangleUnscopedTemplateName(const FunctionDecl *FD) {
|
||||
// <unscoped-template-name> ::= <unscoped-name>
|
||||
// ::= <substitution>
|
||||
if (mangleSubstitution(FD))
|
||||
return;
|
||||
|
||||
mangleUnscopedName(FD);
|
||||
addSubstitution(FD);
|
||||
}
|
||||
|
||||
void CXXNameMangler::mangleCalloffset(int64_t nv, int64_t v) {
|
||||
|
|
|
@ -8,12 +8,10 @@ T* next(T* ptr, const U& diff) {
|
|||
}
|
||||
|
||||
void test(int *iptr, float *fptr, int diff) {
|
||||
// FIXME: should be "_Z4nextIiiEPT_S1_RKT0_"
|
||||
// CHECK: _Z4nextIiiEPT_S0_RKT0_
|
||||
// CHECK: _Z4nextIiiEPT_S1_RKT0_
|
||||
iptr = next(iptr, diff);
|
||||
// FIXME: should be "_Z4nextIfiEPT_S1_RKT0_"
|
||||
// CHECK: _Z4nextIfiEPT_S0_RKT0_
|
||||
|
||||
|
||||
// CHECK: _Z4nextIfiEPT_S1_RKT0_
|
||||
fptr = next(fptr, diff);
|
||||
}
|
||||
|
||||
|
@ -22,7 +20,7 @@ T* next(T* ptr, const U& diff);
|
|||
|
||||
void test2(int *iptr, double *dptr, int diff) {
|
||||
iptr = next(iptr, diff);
|
||||
// FIXME: should be "_Z4nextIdiEPT_S1_RKT0_"
|
||||
// CHECK: _Z4nextIiiEPT_S0_RKT0_
|
||||
|
||||
// CHECK: _Z4nextIdiEPT_S1_RKT0_
|
||||
dptr = next(dptr, diff);
|
||||
}
|
||||
|
|
|
@ -88,9 +88,14 @@ void f(void (S::*)()) {}
|
|||
// CHECK: define void @_Z1fi
|
||||
void f(const int) { }
|
||||
|
||||
// CHECK: define linkonce_odr void @_Z2tfIidEvT0_T_
|
||||
template<typename T, typename U> void tf(U u, T t) { }
|
||||
template<typename T, typename U> void ft1(U u, T t) { }
|
||||
|
||||
template<typename T> void ft2(T t, void (*)(T), void (*)(T)) { }
|
||||
|
||||
void g() {
|
||||
tf<int, double>(1, 0);
|
||||
// CHECK: @_Z3ft1IidEvT0_T_
|
||||
ft1<int, double>(1, 0);
|
||||
|
||||
// CHECK: @_Z3ft2IcEvT_PFvS0_ES2_
|
||||
ft2<char>(1, 0, 0);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче