how to modify the functiondecl‘s args and get a new function name by mangle()

9 Views Asked by At

i have a functiondecl(maybe with templatedecl), and i want to some of the function parameters' type and get the new functiondecl mangle name. so i have tried to create a new functiondecl by FunctionDecl::Create() and get it initialization paramnets from the old functiondecl by FunctionDecl::parameters()...

function(R, class); function(int, class);

-> what i want is get the blow function mangle name. function(float, class);

auto FD = FunctionDecl::Create(NewParams)
FD->setParams(NewParams);
FD->setFunctionTemplateSpecialization()
FuncName = MangleContext::mangleName(GlobalDecl(FD), Out);

the FuncName is same to the old functiondecl.

0

There are 0 best solutions below