Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
Show First 20 Lines • Show All 291 Lines • ▼ Show 20 Lines | |||||
template <class T> struct simplify_type<const IntrusiveRefCntPtr<T>> { | template <class T> struct simplify_type<const IntrusiveRefCntPtr<T>> { | ||||
using SimpleType = /*const*/ T *; | using SimpleType = /*const*/ T *; | ||||
static SimpleType getSimplifiedValue(const IntrusiveRefCntPtr<T> &Val) { | static SimpleType getSimplifiedValue(const IntrusiveRefCntPtr<T> &Val) { | ||||
return Val.get(); | return Val.get(); | ||||
} | } | ||||
}; | }; | ||||
/// Factory function for creating intrusive ref counted pointers. | |||||
MaskRay: s/smart/intrusive/.
Though I guess "smart ref counted pointers" can just be omitted. | |||||
template <typename T, typename... Args> | |||||
IntrusiveRefCntPtr<T> makeIntrusiveRefCnt(Args &&...A) { | |||||
return IntrusiveRefCntPtr<T>(new T(std::forward<Args>(A)...)); | |||||
} | |||||
} // end namespace llvm | } // end namespace llvm | ||||
#endif // LLVM_ADT_INTRUSIVEREFCNTPTR_H | #endif // LLVM_ADT_INTRUSIVEREFCNTPTR_H |
s/smart/intrusive/.
Though I guess "smart ref counted pointers" can just be omitted.