Hi,
I was wondering if there was any way to return an i1 type (or something that llvm would accept as one, internally) from a C function compiled with llvm-gcc. My thought from searching around was that it might take rewriting (or at least writing a wrapper to %trunc the result) in assembly. I’m fairly new to LLVM so I may have missed something important.
Any thoughts ?
Thanks much,
Gordon Keiser
Hi Gordon,
I was wondering if there was any way to return an i1 type (or something that
llvm would accept as one, internally) from a C function compiled with llvm-gcc.
no, there is no way without modifying llvm-gcc.
Ciao, Duncan.
Hi Gordon,
Clang can do it if you include <stdbool.h> . I found this out when writing a LibC wrapper library for LLVM Bitcode.
--Sam
Hi,
Good to know. I tried that last night with llvm-gcc just in case, but alas, it didn't help. Good to know that Clang supports it for the future though.
Thanks everyone,
Gordon