Split the addPassesToEmitFile method up into two. This is so that we can