CurFn is only used for relocations. Use EmissionDetails.MF->getFunction() instead.