ir: Add EnumDeclaration constant copy function