I am currently using i8 * to represent void pointers in my generated IR, but it is rather difficult to distinguish void * from char *, for example. Are there common approaches to solving this? I searched around quite a bit, no luck.
For every other type pair, I can directly use llvm :: Type * to distinguish between types, so it adds a lot of complexity if I can no longer do this only for the special case of void pointers.
One idea might be to use a named structure containing i8 as the void type (for example,% void = type {i8}) and use pointers instead, but the clang generated IR uses i8 * when you give it a void pointer type, so I not sure what the advantages / disadvantages of each of them are.
llvm llvm-ir
Lane
source share