1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

add helper method.

llvm-svn: 67989
This commit is contained in:
Chris Lattner 2009-03-29 06:32:46 +00:00
parent 2c6632d760
commit 696742399a

View File

@ -78,6 +78,8 @@ namespace llvm {
Val.setInt(1);
}
bool isNull() const { return Val.getPointer() == 0; }
template<typename T>
int is() const {
return Val.getInt() == ::llvm::getPointerUnionTypeNum<PT1, PT2>((T*)0);