[LLVMdev] Returning i1 type ints from C code ? (original) (raw)

Samuel Crow samuraileumas at yahoo.com
Thu Sep 22 10:07:42 PDT 2011


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


From: Gordon Keiser <gkeiser at arxan.com> To: "llvmdev at cs.uiuc.edu" <llvmdev at cs.uiuc.edu> Sent: Wednesday, September 21, 2011 9:55 PM Subject: [LLVMdev] Returning i1 type ints from C code ?

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


LLVM Developers mailing list LLVMdev at cs.uiuc.edu        http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list