How to check if a llvm::Value
is signed or not (provided that it is either an integer or a float/double)?
My attempt:
From docs for Value
Type* getType() const;
Can return a Type
object containing the type information of a Value
.
It is easy to check whether Value
is integer/float/double using it:
bool isFloatTy() const;
bool isDoubleTy() const;
But I am having trouble figuring out how to check whether Type
is a signed number or not, since there is no method like bool isSignedTy() const;
or anything like it.
How do I do the check?