This may sound weird, but what exactly is a FunctionType? That is, in terms of memory, or underlying value, what does the FunctionType actually represent. At first I though it might be a pointer, but it is not -- since you have to wrap a PointerType around it to use as such. Can a FunctionType value actually exist, or is strictly an abstract concept? In particular, can I actually directly define some type to be a function type, or must I always declare it as a pointer to that type? -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 259 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121118/f9068688/attachment.sig>
On Sun, Nov 18, 2012 at 6:40 AM, edA-qa mort-ora-y <eda-qa at disemia.com> wrote:> This may sound weird, but what exactly is a FunctionType? That is, in > terms of memory, or underlying value, what does the FunctionType > actually represent. At first I though it might be a pointer, but it is > not -- since you have to wrap a PointerType around it to use as such. > Can a FunctionType value actually exist, or is strictly an abstract > concept? In particular, can I actually directly define some type to be a > function type, or must I always declare it as a pointer to that type?Types, function or otherwise, have no in-memory representation. They merely describe how bits should be interpreted. - David> > -- > edA-qa mort-ora-y > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > Sign: Please digitally sign your emails. > Encrypt: I'm also happy to receive encrypted mail. > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
On 18/11/12 18:37, David Blaikie wrote:> Types, function or otherwise, have no in-memory representation. They > merely describe how bits should be interpreted.This is what I'm asking about the FunctionType. If I have a Pointer to a FunctionType it is clear how the bits should be interpreted, but what does the FunctionType it self say about the bits, if anything? In terms of use, can I create variables which are of FunctionType directly? -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 259 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121118/c1d9c684/attachment.sig>