[LLVMdev] Check if an IntegerType is signed

John Criswell criswell at illinois.edu
Thu Sep 16 11:53:25 PDT 2010


Arushi Aggarwal wrote:
> How can I check if a particular Integer Type is signed/unsigned?

I don't believe you can.  LLVM treats integers as twos-complement.  Only 
the arithmetic and comparison operations which would yield different bit 
patterns based on sign have an associated sign.

Can you tell us what you're trying to do?

-- John T.

>
> Arushi




More information about the llvm-dev mailing list