}
void CXXNameMangler::mangleType(const TypenameType *T) {
- assert(false && "can't mangle dependent typenames yet");
+ // Typename types are always nested
+ Out << 'N';
+
+ const Type *QTy = T->getQualifier()->getAsType();
+ if (const TemplateSpecializationType *TST =
+ dyn_cast<TemplateSpecializationType>(QTy)) {
+ TemplateDecl *TD = TST->getTemplateName().getAsTemplateDecl();
+
+ mangleTemplatePrefix(TD);
+ mangleTemplateArgs(TST->getArgs(), TST->getNumArgs());
+ } else
+ assert(false && "Unhandled type!");
+
+ mangleSourceName(T->getIdentifier());
+
+ Out << 'E';
}
void CXXNameMangler::mangleExpression(const Expr *E) {
// CHECK: @_ZNK5DebuglsEj
int main(void) { dbg << 32 ;}
}
+
+template<typename T> struct S6 {
+ typedef int B;
+};
+
+template<typename T> void ft5(typename S6<T>::B) { }
+// CHECK: @_Z3ft5IiEvN2S6IT_E1BE
+template void ft5<int>(int);