Check if an IntegerType is signed

How can I check if a particular Integer Type is signed/unsigned?

Arushi

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.

The signess of the operands is described in the operation itself, should
the sign be relevant, such as
Instruction::UDiv and Instructin::SDiv (unsigned and signed division)
Instruction::URem and Instruction::SRem