aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-07-16 19:58:26 +0000
committerTed Kremenek <kremenek@apple.com>2009-07-16 19:58:26 +0000
commite3fb4b65243972788b91f98b66fe4e911e1d9e90 (patch)
tree15718d8cc74d63fe862e053662c5de8dc46c1584 /llvm/lib/CodeGen/MachineInstr.cpp
parentc277dc408bea3697fbaa3429658c4d8deff3f066 (diff)
downloadllvm-e3fb4b65243972788b91f98b66fe4e911e1d9e90.zip
llvm-e3fb4b65243972788b91f98b66fe4e911e1d9e90.tar.gz
llvm-e3fb4b65243972788b91f98b66fe4e911e1d9e90.tar.bz2
Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.
This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. llvm-svn: 76098
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions