aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/PointerLikeTypeTraits.h14
-rw-r--r--include/llvm/Use.h11
2 files changed, 14 insertions, 11 deletions
diff --git a/include/llvm/Support/PointerLikeTypeTraits.h b/include/llvm/Support/PointerLikeTypeTraits.h
index c5f79cc..226dacf 100644
--- a/include/llvm/Support/PointerLikeTypeTraits.h
+++ b/include/llvm/Support/PointerLikeTypeTraits.h
@@ -58,6 +58,20 @@ public:
enum { NumLowBitsAvailable = 3 };
};
+// Pointers to pointers are only 4-byte aligned on 32-bit systems.
+template<typename T>
+class PointerLikeTypeTraits<T**> {
+public:
+ static inline void *getAsVoidPointer(T** P) { return P; }
+ static inline T **getFromVoidPointer(void *P) {
+ return static_cast<T**>(P);
+ }
+ enum { NumLowBitsAvailable = 2 };
+};
+
+
+
+
// Provide PointerLikeTypeTraits for uintptr_t.
template<>
class PointerLikeTypeTraits<uintptr_t> {
diff --git a/include/llvm/Use.h b/include/llvm/Use.h
index 53df699..32cdd1b 100644
--- a/include/llvm/Use.h
+++ b/include/llvm/Use.h
@@ -29,17 +29,6 @@ class Use;
/// Tag - generic tag type for (at least 32 bit) pointers
enum Tag { noTag, tagOne, tagTwo, tagThree };
-// Use** is only 4-byte aligned.
-template<>
-class PointerLikeTypeTraits<Use**> {
-public:
- static inline void *getAsVoidPointer(Use** P) { return P; }
- static inline Use **getFromVoidPointer(void *P) {
- return static_cast<Use**>(P);
- }
- enum { NumLowBitsAvailable = 2 };
-};
-
//===----------------------------------------------------------------------===//
// Use Class
//===----------------------------------------------------------------------===//