Currently I use i8* to represent void pointers in my generated IR, but this makes it quite difficult to differentiate void* from char*, for example. Are there any common approaches to solving this? I have searched around quite a bit with no luck.
For every other pair of types I am able to directly use the llvm::Type* to differentiate the types, so it adds a lot of complexity if I can no longer do that just for the special case of void pointers.
One idea might be to use a named struct containing i8 as the void type (for example, %void = type { i8 } ) and take pointers to that instead, but clang generated IR uses i8* when you give it a void pointer type, so I am not sure what the advantages/disadvantages of each are.