mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Value* only has 2 bits free as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67984 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e30173ac33
commit
aab3d88bc4
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user