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:
e30173a
)
Value* only has 2 bits free as well.
author
Chris Lattner
<sabre@nondot.org>
Sun, 29 Mar 2009 05:45:43 +0000
(
05:45
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 29 Mar 2009 05:45:43 +0000
(
05:45
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67984
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Value.h
patch
|
blob
|
history
diff --git
a/include/llvm/Value.h
b/include/llvm/Value.h
index b6aa66b7055739e7b78b715e8d2a3a1b58300b88..5f2e35f0c5b4568bd70ff7245e453c0bd0f6854c 100644
(file)
--- a/
include/llvm/Value.h
+++ b/
include/llvm/Value.h
@@
-303,6
+303,19
@@
template <> inline bool isa_impl<GlobalValue, Value>(const Value &Val) {
return isa<GlobalVariable>(Val) || isa<Function>(Val) ||
isa<GlobalAlias>(Val);
}
+
+
+// Value* is only 4-byte aligned.
+template<>
+class PointerLikeTypeTraits<Value*> {
+ typedef Value* PT;
+public:
+ static inline void *getAsVoidPointer(PT P) { return P; }
+ static inline PT getFromVoidPointer(void *P) {
+ return static_cast<PT>(P);
+ }
+ enum { NumLowBitsAvailable = 2 };
+};
} // End llvm namespace