xref: /xnu-8792.61.2/tests/intrusive_shared_ptr_src/abi.callee.raw.cpp (revision 42e220869062b56f8d7d0726fd4c88954f87902c)
1 //
2 // Declare a function as returning a shared pointer (in the header), but
3 // implement it by returning a raw pointer. This represents a TU that would
4 // not have been translated to shared pointers yet.
5 //
6 // In this TU, SharedPtr<T> is just T* since USE_SHARED_PTR is not defined.
7 //
8 
9 #include "abi_helper.h"
10 
11 SharedPtr<T>
return_raw_as_shared(T * ptr)12 return_raw_as_shared(T* ptr)
13 {
14 	return ptr;
15 }
16