1 //
2 // Declare a function as returning a raw pointer (in the header), but
3 // implement it by returning a shared pointer. This represents a TU that
4 // would have been translated to shared pointers.
5 //
6 // In this TU, SharedPtr<T> is intrusive_shared_ptr<T>, since USE_SHARED_PTR
7 // is defined.
8 //
9 
10 #define USE_SHARED_PTR
11 
12 #include "abi_helper.h"
13 
14 SharedPtr<T>
return_shared_as_raw(T * ptr)15 return_shared_as_raw(T* ptr)
16 {
17 	return SharedPtr<T>(ptr, libkern::no_retain);
18 }
19