[LLVMdev] Problems with void*
Ricardo
rmivs-jygf at yahoo.com
Fri Jun 10 15:32:52 PDT 2005
Hello,
I am trying to use the LLVM classes (with Modules in memory) to represent some programs that use
the void* type but I am having some problems handling that type.
If I use WriteBytecodeToFile, I receive this error:
Assertion `slot != -1 && "Module broken!"`
If I save the module directly with PrintModulePass, it generates the .ll file fine, but if I try
to compile it with llvm-as, as soon as it finds 'void *' it complains that it was expecting an "("
instead of an "*". I suppose that the correct syntax is something like this: 'void (sbyte *)*'
For example, these lines can cause the error:
%castinst1 = cast typeXYZ* %var to void* ; <void*> [#uses=1]
or
%astruct = type { %int*, %void*, *astruct }
My question is, how can I generate 'void (sbyte*)*' using the LLVM classes?
Thanks!
More information about the llvm-dev
mailing list