[LLVMdev] numeric limits of llvm Types?

Alexander Poddey alexander.poddey at gmx.net
Fri Jan 23 00:21:30 PST 2015


Having a llvm  float type
Type* pType

i can do 
const fltSemantics &fltS=pType->getFltSemantics();

In the debugger, I see taht fltS has maxExponent, minExponent, precision.

However, if I try to access these, I get an error like
 'Illegal use of incomplete type....'

Guess this is just a lack of c++ skills....


Alex 
 




Alexander Poddey wrote:

> Hi all,
> 
> can I access the numeric limits of the llvm types,
> e.g. HalfTy, FloatTy, DoubleTy, etc.
> in a fashion like the std numeric_limits tool?
> 
> std::numeric_limits<half>::min()
> std::numeric_limits<half>::max()
> 
> In c++API, I want to initialize values and need to know the correct range
> for the llvm types....
> 
> 
> 
> Thx
> Alex





More information about the llvm-dev mailing list