added addPassesToEmitFileAndRunPassManager