Ignore:
Timestamp:
Aug 6, 2018, 10:47:55 AM (3 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
8316a49
Parents:
4084928e
Message:

Change signature of cforall_demangle to be C-compatible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/demangler.cc

    r4084928e rf47d0ad  
    55
    66void f(const std::string & mangleName) {
    7   cout << mangleName << " => " << std::flush << cforall_demangle(mangleName) << endl;
     7        char * demangleName = cforall_demangle(mangleName.c_str());
     8        cout << mangleName << " => " << std::flush << demangleName << endl;
     9        free(demangleName);
    810}
    911
    1012int main() {
    11   ifstream in("in-demangle.txt");
    12   std::string line;
    13   while (getline(in, line)) {
    14     if (line.empty()) { cout << "=================================" << endl; continue; }
    15     else if (line[0] == '#') continue;
    16     f(line);
    17   }
     13        ifstream in("in-demangle.txt");
     14        std::string line;
     15        while (getline(in, line)) {
     16                if (line.empty()) { cout << "=================================" << endl; continue; }
     17                else if (line[0] == '#') continue;
     18                f(line);
     19        }
    1820}
Note: See TracChangeset for help on using the changeset viewer.