Last change
on this file since 562ccf9 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
|
Line | |
---|
1 | #include "Demangle.hpp" |
---|
2 | #include <iostream> |
---|
3 | #include <fstream> |
---|
4 | |
---|
5 | void demangleAndPrint(const std::string & mangleName) { |
---|
6 | char * demangleName = cforall_demangle(mangleName.c_str(), 0); |
---|
7 | std::cout << mangleName << " => " << demangleName << std::endl; |
---|
8 | free(demangleName); |
---|
9 | } |
---|
10 | |
---|
11 | int main(int argc, char * argv[]) { |
---|
12 | char const * fileName = (1 < argc) ? argv[1] : "in-demangle.txt"; |
---|
13 | std::ifstream in(fileName); |
---|
14 | |
---|
15 | std::string line; |
---|
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 | } |
---|
24 | } |
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.