diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2009-01-09 19:25:42 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2009-01-09 19:25:42 +0000 |
commit | 3a54b3dc87a581c203b18050b4f787b4ca28a12c (patch) | |
tree | c7cd9d64b35ff34786c12499439ef5e525642d50 /include/llvm/ADT/PointerIntPair.h | |
parent | 6e7a1617ac4a34792d9097b8d3644b72f57a45f7 (diff) | |
download | llvm-3a54b3dc87a581c203b18050b4f787b4ca28a12c.tar.gz llvm-3a54b3dc87a581c203b18050b4f787b4ca28a12c.tar.bz2 llvm-3a54b3dc87a581c203b18050b4f787b4ca28a12c.tar.xz |
Removed trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62000 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/PointerIntPair.h')
-rw-r--r-- | include/llvm/ADT/PointerIntPair.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/ADT/PointerIntPair.h b/include/llvm/ADT/PointerIntPair.h index 176f670bb8..c2d949364b 100644 --- a/include/llvm/ADT/PointerIntPair.h +++ b/include/llvm/ADT/PointerIntPair.h @@ -17,10 +17,10 @@ #include <cassert> namespace llvm { - + template<typename T> struct DenseMapInfo; - + /// PointerIntPair - This class implements a pair of a pointer and small /// integer. It is designed to represent this in the space required by one /// pointer by bitmangling the integer into the low part of the pointer. This @@ -40,27 +40,27 @@ public: PointerTy getPointer() const { return reinterpret_cast<PointerTy>(Value & ~((1 << IntBits)-1)); } - + IntType getInt() const { return (IntType)(Value & ((1 << IntBits)-1)); } - + void setPointer(PointerTy Ptr) { intptr_t PtrVal = reinterpret_cast<intptr_t>(Ptr); assert((PtrVal & ((1 << IntBits)-1)) == 0 && "Pointer is not sufficiently aligned"); Value = PtrVal | (intptr_t)getInt(); } - + void setInt(IntType Int) { intptr_t IntVal = Int; assert(IntVal < (1 << IntBits) && "Integer too large for field"); Value = reinterpret_cast<intptr_t>(getPointer()) | IntVal; } - + void *getOpaqueValue() const { return reinterpret_cast<void*>(Value); } void setFromOpaqueValue(void *Val) { Value = reinterpret_cast<intptr_t>(Val);} - + bool operator==(const PointerIntPair &RHS) const {return Value == RHS.Value;} bool operator!=(const PointerIntPair &RHS) const {return Value != RHS.Value;} bool operator<(const PointerIntPair &RHS) const {return Value < RHS.Value;} |