Factor out EH landing pad code into a separate function, and constify