now works with -fno-exceptions and -fno-rtti

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@110828 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/memory b/include/memory
index 3358a19..5aa2fad 100644
--- a/include/memory
+++ b/include/memory
@@ -2642,7 +2642,9 @@
     long use_count() const {return __shared_count::use_count();}
     __shared_weak_count* lock();
 
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* __get_deleter(const type_info&) const;
+#endif
 private:
     virtual void __on_zero_shared_weak() = 0;
 };
@@ -2656,13 +2658,17 @@
     __shared_ptr_pointer(_Tp __p, _Dp __d, _Alloc __a)
         :  __data_(__compressed_pair<_Tp, _Dp>(__p, _STD::move(__d)), _STD::move(__a)) {}
 
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* __get_deleter(const type_info&) const;
+#endif
 
 private:
     virtual void __on_zero_shared();
     virtual void __on_zero_shared_weak();
 };
 
+#ifndef _LIBCPP_NO_RTTI
+
 template <class _Tp, class _Dp, class _Alloc>
 const void*
 __shared_ptr_pointer<_Tp, _Dp, _Alloc>::__get_deleter(const type_info& __t) const
@@ -2670,6 +2676,8 @@
     return __t == typeid(_Dp) ? &__data_.first().second() : 0;
 }
 
+#endif
+
 template <class _Tp, class _Dp, class _Alloc>
 void
 __shared_ptr_pointer<_Tp, _Dp, _Alloc>::__on_zero_shared()
@@ -2834,9 +2842,11 @@
     template <class _U> bool owner_before(weak_ptr<_U> const& __p) const
         {return __cntrl_ < __p.__cntrl_;}
 
+#ifndef _LIBCPP_NO_RTTI
     template <class _Dp>
         _Dp* __get_deleter() const
             {return (_Dp*)(__cntrl_ ? __cntrl_->__get_deleter(typeid(_Dp)) : 0);}
+#endif
 
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
@@ -3591,6 +3601,8 @@
     return shared_ptr<_Tp>(__r, const_cast<_Tp*>(__r.get()));
 }
 
+#ifndef _LIBCPP_NO_RTTI
+
 template<class _Dp, class _Tp>
 inline _LIBCPP_INLINE_VISIBILITY
 _Dp*
@@ -3599,6 +3611,8 @@
     return __p.template __get_deleter<_Dp>();
 }
 
+#endif
+
 template<class _Tp>
 class weak_ptr
 {