[LLVMdev] Primitive types

Chris Lattner sabre at nondot.org
Thu Jun 17 13:29:03 PDT 2004


On Thu, 17 Jun 2004, Chris Lattner wrote:

> On Thu, 17 Jun 2004, Vladimir Prus wrote:
>
> > I'm getting this in debugger, where 't' is 'Type*':
> >
> >    (gdb) p t->isPrimitiveType()
> >    $15 = false
> >    (gdb) p t->getPrimitiveID()
> >    $16 = PointerTyID
> >    (gdb) p t->getPrimitiveSize()
> >    $17 = 0
> >
> > There are a couple of things that I'd like to ask. First, if
> > isPrimitiveType()  returns false, that the fact that getPrimitiveID
> > returns reasonable value is quite strange. Maybe, the method is better
> > called just getID, since it can get id for both primitive and derived
> > types.
>
> You're right, getPrimitiveID seems misnamed.  It should be named
> getTypeID()  or something.

BTW, I just fixed this.  You will probably have to make minor changes to
your source, but just s/PrimitiveID/TypeID/ should work.

http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040614/015245.html

The getPrimitiveSize() method retains its name, as it still only works on
primitive types.

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/




More information about the llvm-dev mailing list