For `scala.Int`, `toIRType` returns `IntType` but `toReferenceType` returns `ClassType("scala_Int")`.
In general, `toReferenceType` makes sure that it always returns either a `ClassType` or an `ArrayType`, even if, in order to do so, it has to create a `ClassType` for a primitive or other weird things. This is so that an `Array[Int]` appears as `ArrayType("scala_Int", 1)`.