Function.getName() is empty


I am trying to print the names of all functions within a module. However, I observe few functions have their getName() return an empty string (also, hasName() returns false).

Inspecting the .ll file, I see the functions exist. An example looks like below:
define internal fastcc void @0(%struct._Z5PixelIiE* nocapture %this) unnamed_addr {…}

This looks like an internal function created while calling the c’tor of my class.

So, Do we know a set of scenarios where a function’s hasName() is expected to return false?
In other words, I cannot assume a function’s getName() will always return a non-empty string ?

Yes, these are anonymous internal functions, it is expected that getName() will return an empty string.

ok, Thanks for your reply !

I will add an F->hasName() check before handling my cases.