[llvm-commits] [PATCH] TargetData::getIntPtrType() to return IntegerType

Jay Foad jay.foad at gmail.com
Thu May 7 05:09:18 PDT 2009


The attached patch lets me avoid some casts to IntegerType in some
code I'm working on. Thoughts? It passes regression tests and cfe and
llvm-gcc still build.

It's a bit unfortunate that TargetData.h has to include
DerivedTypes.h, but otherwise this would break code like:

  const Type *Ty = TD->getIntPtrType();

which now needs to know that IntegerType is derived from Type.

Thanks,
Jay.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.intptr
Type: application/octet-stream
Size: 1373 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090507/53143c4e/attachment.obj>


More information about the llvm-commits mailing list