Home | History | Annotate | Download | only in gcc-demangle
      1 #include <stdio.h>
      2 
      3 const char* names[4] = {"_ZN6SkPath4IterC1ERKS_b",
      4     "_ZN6SkPath4Iter4nextEP7SkPoint",
      5     "_ZN6SkScan8HairLineERK7SkPointS2_PK8SkRegionP9SkBlitter",
      6     NULL};
      7 
      8 extern char *__cxa_demangle (const char *mangled, char *buf, size_t *len,
      9                              int *status);
     10 
     11 char* demangle_symbol_name(const char*name) {
     12     return name ? __cxa_demangle(name, 0, 0, 0) : "";
     13 }
     14 
     15 int main() {
     16   int i;
     17   for (i=0; i<4; ++i) {
     18     printf ("%s -> %s\n", names[i], demangle_symbol_name(names[i]));
     19   }
     20   return 0;
     21 }
     22