search for: offsetofsizeof

Displaying 4 results from an estimated 4 matches for "offsetofsizeof".

2008 May 07
0
[LLVMdev] How to handle size_t in front ends?
...> size > of a pointer? No. > 2) Assuming the above answer is "no", what's the best way for the > front > end to measure the size of a pointer? It doesn't help for interfacing to C, but you can do things like this: http://llvm.org/docs/tutorial/LangImpl8.html#offsetofsizeof If you want to generate a constant as a Value* in the IR. For emitting the right sized integer type, I'm afraid that your front- end needs to know the size of the integer. If you are willing to accept an ugly hack that works almost always on common targets, you can just declare the size_...
2008 May 07
3
[LLVMdev] How to handle size_t in front ends?
For the most part, it appears that writing a front end can be almost entirely platform-independent. For example, my front end doesn't know how big a pointer is, and for the most part doesn't care. All of the platform-specific aspects of compilation have, up to this point, been hidden behind the IR. However, where things get tricky is in calling C functions that take a size_t as a
2008 May 21
2
[LLVMdev] How to handle size_t in front ends?
...t;> 2) Assuming the above answer is "no", what's the best way for the >> front >> end to measure the size of a pointer? >> > > It doesn't help for interfacing to C, but you can do things like this: > http://llvm.org/docs/tutorial/LangImpl8.html#offsetofsizeof > > If you want to generate a constant as a Value* in the IR. > > For emitting the right sized integer type, I'm afraid that your front- > end needs to know the size of the integer. > > > If you are willing to accept an ugly hack that works almost always on > commo...
2008 May 21
0
[LLVMdev] How to handle size_t in front ends?
...g the above answer is "no", what's the best way for the >>> front >>> end to measure the size of a pointer? >>> >> >> It doesn't help for interfacing to C, but you can do things like this: >> http://llvm.org/docs/tutorial/LangImpl8.html#offsetofsizeof >> >> If you want to generate a constant as a Value* in the IR. >> >> For emitting the right sized integer type, I'm afraid that your front- >> end needs to know the size of the integer. >> >> >> If you are willing to accept an ugly hack that work...