[LLVMdev] Why Is This Illegal?
Reid Spencer
reid at x10sys.com
Fri Jun 9 11:00:49 PDT 2006
Can anyone tell me where my blunder is in the following program?
llvm-as reports:
llvm-as: testit.ll:11: Can't store 'opaque *' into space of type 'opaque
*'!
Which doesn't seem to make sense to me. What is it that is illegal about
storing a pointer to opaque in a space that is of type pointer to
opaque? Is it just that you can't store pointers to opaque?
%path = internal constant [11 x sbyte] c"/some/path\00"
implementation ; Functions:
declare opaque* %open(sbyte*)
internal int %testme(int, sbyte**) {
%stdout = alloca opaque*
%pathp = getelementptr [11 x sbyte]* %path, uint 0, uint 0
%handle = call opaque* %open( sbyte* %pathp )
store opaque* %handle, opaque* %stdout ; This
is line 11
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060609/8e35674f/attachment.sig>
More information about the llvm-dev
mailing list