From: Chandler Carruth Date: Tue, 29 Dec 2015 02:14:45 +0000 (+0000) Subject: [ADT] Run clang-format over another file before I try to enhance it so X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5c35f963fb19dbd9961d8df73a4e3cdf1fd219fd;p=oota-llvm.git [ADT] Run clang-format over another file before I try to enhance it so I don't commit the bug in r256518 again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256530 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/PointerLikeTypeTraits.h b/include/llvm/Support/PointerLikeTypeTraits.h index 8e6659c92fd..95d735869f2 100644 --- a/include/llvm/Support/PointerLikeTypeTraits.h +++ b/include/llvm/Support/PointerLikeTypeTraits.h @@ -19,19 +19,16 @@ namespace llvm { -/// PointerLikeTypeTraits - This is a traits object that is used to handle -/// pointer types and things that are just wrappers for pointers as a uniform -/// entity. -template -class PointerLikeTypeTraits { +/// A traits type that is used to handle pointer types and things that are just +/// wrappers for pointers as a uniform entity. +template class PointerLikeTypeTraits { // getAsVoidPointer // getFromVoidPointer // getNumLowBitsAvailable }; // Provide PointerLikeTypeTraits for non-cvr pointers. -template -class PointerLikeTypeTraits { +template class PointerLikeTypeTraits { public: static inline void *getAsVoidPointer(T *P) { return P; } static inline T *getFromVoidPointer(void *P) { return static_cast(P); } @@ -46,26 +43,24 @@ public: }; // Provide PointerLikeTypeTraits for const pointers. -template -class PointerLikeTypeTraits { - typedef PointerLikeTypeTraits NonConst; +template class PointerLikeTypeTraits { + typedef PointerLikeTypeTraits NonConst; public: - static inline const void *getAsVoidPointer(const T* P) { - return NonConst::getAsVoidPointer(const_cast(P)); + static inline const void *getAsVoidPointer(const T *P) { + return NonConst::getAsVoidPointer(const_cast(P)); } static inline const T *getFromVoidPointer(const void *P) { - return NonConst::getFromVoidPointer(const_cast(P)); + return NonConst::getFromVoidPointer(const_cast(P)); } enum { NumLowBitsAvailable = NonConst::NumLowBitsAvailable }; }; // Provide PointerLikeTypeTraits for uintptr_t. -template<> -class PointerLikeTypeTraits { +template <> class PointerLikeTypeTraits { public: static inline void *getAsVoidPointer(uintptr_t P) { - return reinterpret_cast(P); + return reinterpret_cast(P); } static inline uintptr_t getFromVoidPointer(void *P) { return reinterpret_cast(P);