problems naming a function

I created a new Function in code(for a pass), and now I want to name
it to make the IR more readable.

Function inherits GlobalValue, which eventually inherits Value. Value
has the setName() method. When I do this on my new
function(newFunc->setName(string("testing"))) I get back "error:
‘setName’ was not declared in this scope". What is the correct way
todo this?

Thanks

setName is correct.

-Eli