projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2491e46
)
add helper method.
author
Chris Lattner
<sabre@nondot.org>
Sun, 29 Mar 2009 06:32:46 +0000
(06:32 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 29 Mar 2009 06:32:46 +0000
(06:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67989
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/PointerUnion.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/PointerUnion.h
b/include/llvm/ADT/PointerUnion.h
index 8ea1315a736e289e12354c6d58fae7a7cffafe5f..7a4de65656681fb480345e1196c21da8bf49516e 100644
(file)
--- a/
include/llvm/ADT/PointerUnion.h
+++ b/
include/llvm/ADT/PointerUnion.h
@@
-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);