]>
git.saurik.com Git - apple/xnu.git/blob - tests/intrusive_shared_ptr_src/abi.callee.smart.cpp
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.
6 // In this TU, SharedPtr<T> is intrusive_shared_ptr<T>, since USE_SHARED_PTR
10 #define USE_SHARED_PTR
12 #include "abi_helper.h"
15 return_shared_as_raw(T
* ptr
)
17 return SharedPtr
<T
>(ptr
, libkern::no_retain
);