Compiler plugin generate IrGetEnumValue

I’m working on a compiler plugin for object mapping generation (Mappie), and I’m having an issue creating an IrGetEnumValue. My current approach is mappie/compiler-plugin/src/main/kotlin/tech/mappie/util/Ir.kt at v0.5.0 · Mr-Mappie/mappie (github.com), but this seems to break between different compiler versions.

I think the recommended approach for compiler plugins is by using the functions in ExpressionHelpers, but I can’t find the correct way to generate a IrGetEnumValue from an IrEnumEntry.

Can someone point me in the right direction?

Edit: I found an ugly workaround, using an IrCall of valueOf with the name of the IrEnumEntry.