add getPtrTypeInContext function to CodegenPass.
MAYBE backed would be a better place for it ?