Adding new derived types

I’m working on a program that uses LLVM and also needs to represent types of terms. It turns out that I’ll need to handle all the LLVM types plus some more e.g. rational numbers and type variables for type inference.

It would be nice if I could use the existing Type class and add a couple of extra subclasses of it. However, this might be problematic because enum TypeID is defined within class Type, so there’s no way to add new entries (well, not without going in and editing the LLVM headers, which for obvious reasons isn’t a desirable solution).

What’s the recommended solution to this sort of problem? Is there an easy way around the above that I’m missing?