-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
Is there a simple way how to clone functions?
I'd like to duplicate a function like this:
func duplicate(m *ir.Module, foo string) {
for _, f := range m.Funcs {
if f.GlobalIdent.GlobalName == foo {
DuplicateFunc(m, f, foo + "_v2")
}
}
}And afterwards I'd do some minor changes in the function code.