-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNameMangling.cpp
More file actions
39 lines (29 loc) · 746 Bytes
/
Copy pathNameMangling.cpp
File metadata and controls
39 lines (29 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "NameMangling.h"
// Qt includes
#include <QtCore/QVariant>
// Local includes
#include "Expression.h"
NameMangling::NameMangling()
{
}
QString NameMangling::mangleFunctionName(const QString &functionName, const QList<int> ¶metersTypes)
{
QString result("?");
result += functionName;
foreach(int type, parametersTypes)
{
QString typeName(QMetaType::typeName(type));
result += '|';
result += typeName;
}
return result;
}
QString NameMangling::mangleFunctionName(const QString &functionName, const QList<Expression*> &expressionList)
{
QList<int> types;
foreach(Expression* expression, expressionList)
{
types.append(static_cast<int>(expression->type()));
}
return mangleFunctionName(functionName, types);
}