ir: Add prevEnum field to EnumDeclaration.