Added profiles for manual tests, cleaned up.

This commit is contained in:
Friedemann Kleint
2010-07-13 11:16:17 +02:00
parent f0f9635d5a
commit ced7e3a0fc
17 changed files with 46 additions and 1301 deletions

View File

@@ -55,7 +55,9 @@
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <cxxabi.h>
#ifdef __GNUC__
# include <cxxabi.h>
#endif
using namespace CPlusPlus;
@@ -103,9 +105,12 @@ protected:
}
static QByteArray name(AST *ast) {
#ifdef __GNUC__
QByteArray name = abi::__cxa_demangle(typeid(*ast).name(), 0, 0, 0) + 11;
name.truncate(name.length() - 3);
#else
QByteArray name = typeid(*ast).name();
#endif
return name;
}
@@ -199,7 +204,11 @@ public:
protected:
QByteArray name(Symbol *s) {
#ifdef __GNUC__
QByteArray result = abi::__cxa_demangle(typeid(*s).name(), 0, 0, 0) + 11;
#else
QByteArray result = typeid(*s).name();
#endif
if (s->identifier()) {
result.append("\\nid: ");
result.append(s->identifier()->chars());