[LLVMdev] Determing C Types
joel.gouly at gmail.com
Mon Apr 16 18:54:47 CDT 2012
Chars don't exist in LLVM. Clang may map char to be i8, but LLVM doesn't
know the difference.
On 17 April 2012 00:14, Ryan Taylor <ryta1203 at gmail.com> wrote:
> Thanks, yes, I realize that's not what it's for; however, it looks like
> with a little tweaking it would be possible but I'd rather not change the
> LLVM base code. Guess I'll just have to write my own code to do this,
> Also, the initial question, so there's no way to tell if int8 was a char
> in LLVM?
> On Mon, Apr 16, 2012 at 3:14 PM, Bill Wendling <wendling at apple.com> wrote:
>> If what you're trying to do is use LLVM as a target-independent bitcode
>> representation, you should be aware that it's not made for that purpose. In
>> fact, it's specifically *not* target-independent, no matter what the types
>> For you initial question, you cannot map back from LLVM IR to C types,
>> because the two have little to do with each other.
>> On Apr 16, 2012, at 2:43 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
>> > So what I would like to do is redefine the widths for the types, making
>> the type widths more portable and less target dependent, is this possible
>> within llvm?
>> > On Mon, Apr 16, 2012 at 2:32 PM, Ryan Taylor <ryta1203 at gmail.com>
>> > What is the best way to determine the type of an arbitrary int? For
>> example, find whether it is a char, short, int, long, long, etc?
>> > _______________________________________________
>> > LLVM Developers mailing list
>> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LLVMdev