[NFC] Move a recently added utility into a location to enable reuse

About to refresh a patch that uses this in FunctionAtrrs, doing the move seperately to control build times.

GitOrigin-RevId: 3ce61fb6d697d49db471c7077b88b3b9ec9dec66
3 files changed