STATIC void cpp_symbol_name(symbol *s) { char *p; p = s->Sident; #if SCPP if (tyfunc(s->Stype->Tty) && s->Sfunc) { if (s->Sfunc->Fflags & Finstance) { Mangle save = mangle; char *q; int len; p = template_mangle(s, s->Sfunc->Fptal); len = strlen(p); q = (char *)alloca(len + 1); memcpy(q, p, len + 1); mangle = save; p = q; } else if (s->Sfunc->Fflags & Foperator) { // operator_name ::= '?' operator_code //CHAR('?'); // already there STR(p); return; } } #endif cpp_zname(p); }
STATIC void cpp_symbol_name(symbol *s) { char *p; p = s->Sident; #if SCPP if (tyfunc(s->Stype->Tty) && s->Sfunc) { if (s->Sfunc->Fflags & Finstance) { Mangle save = mangle; char *q; int len; p = template_mangle(s, s->Sfunc->Fptal); len = strlen(p); q = (char *)alloca(len + 1); memcpy(q, p, len + 1); mangle = save; p = q; } else if (s->Sfunc->Fflags & Foperator) { // operator_name ::= '?' operator_code //CHAR('?'); // already there STR(p); return; } } #endif #if MARS && 0 //It mangles correctly, but the ABI doesn't match, // leading to copious segfaults. At least with the // wrong mangling you get link errors. if (tyfunc(s->Stype->Tty) && s->Sfunc) { if (s->Sfunc->Fflags & Fctor) { cpp_zname(cpp_name_ct); return; } if (s->Sfunc->Fflags & Fdtor) { cpp_zname(cpp_name_dt); return; } } #endif cpp_zname(p); }