check if a method has the same name as the type and rename
This commit is contained in:
Родитель
dee7bc63c2
Коммит
a0ee2b75f7
|
@ -23,6 +23,7 @@ namespace Mono.VisualC.Code.Atoms {
|
|||
public CppType RetType { get; set; }
|
||||
|
||||
public IList<NameTypePair<CppType>> Parameters { get; set; }
|
||||
public Class Klass { get; set; }
|
||||
|
||||
private string formatted_name;
|
||||
|
||||
|
@ -284,6 +285,8 @@ namespace Mono.VisualC.Code.Atoms {
|
|||
sb.Append (Name [i]);
|
||||
}
|
||||
formatted_name = sb.ToString ();
|
||||
if (formatted_name == Klass.Name)
|
||||
formatted_name += "1";
|
||||
}
|
||||
return formatted_name;
|
||||
}
|
||||
|
|
|
@ -328,8 +328,15 @@ namespace Mono.VisualC.Tools.Generator {
|
|||
retType = replaceType (retType, templated.Types[i], genericTypeArgs[i]);
|
||||
}
|
||||
|
||||
var methodAtom = new Method (dtor ? "Destruct" : mname) { RetType = retType, IsVirtual = member.IsTrue ("virtual"), IsStatic = member.IsTrue ("static"), IsConst = member.IsTrue ("const"), IsConstructor = ctor, IsDestructor = dtor };
|
||||
|
||||
var methodAtom = new Method (dtor ? "Destruct" : mname) {
|
||||
RetType = retType,
|
||||
IsVirtual = member.IsTrue ("virtual"),
|
||||
IsStatic = member.IsTrue ("static"),
|
||||
IsConst = member.IsTrue ("const"),
|
||||
IsConstructor = ctor,
|
||||
IsDestructor = dtor,
|
||||
Klass = clas.Class
|
||||
};
|
||||
|
||||
if (AbiTest)
|
||||
methodAtom.Mangled = new NameTypePair<Type> { Name = member.attributes["mangled"], Type = typeof(ItaniumAbi) };
|
||||
|
|
Загрузка…
Ссылка в новой задаче