GetEmitOutput function and testfiles

Instead of you determining this, it would just be easier to get the result as part of EmitResult which is return type of emitFiles() ?, Let compiler update the status?