source: src/SymTab/demangler.cpp @ 5f210c0

Last change on this file since 5f210c0 was c92bdcc, checked in by Andrew Beach <ajbeach@…>, 6 months ago

Updated the rest of the names in src/ (except for the generated files).

  • Property mode set to 100644
File size: 638 bytes
RevLine 
[c92bdcc]1#include "Demangle.hpp"
[d1e0979]2#include <iostream>
3#include <fstream>
4
[c649d2c]5void demangleAndPrint(const std::string & mangleName) {
[90cac45]6        char * demangleName = cforall_demangle(mangleName.c_str(), 0);
[c649d2c]7        std::cout << mangleName << " => " << demangleName << std::endl;
[f47d0ad]8        free(demangleName);
[d1e0979]9}
10
[c649d2c]11int main(int argc, char * argv[]) {
12        char const * fileName = (1 < argc) ? argv[1] : "in-demangle.txt";
13        std::ifstream in(fileName);
14
[f47d0ad]15        std::string line;
[c649d2c]16        while (std::getline(in, line)) {
17                if (line.empty()) {
18                        std::cout << "=================================" << std::endl;
19                } else if (line[0] == '#') {
20                        continue;
21                } else {
22                        demangleAndPrint(line);
23                }
[f47d0ad]24        }
[d1e0979]25}
Note: See TracBrowser for help on using the repository browser.