]> git.saurik.com Git - apple/xnu.git/blame - tests/intrusive_shared_ptr_src/abi.callee.raw.cpp
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tests / intrusive_shared_ptr_src / abi.callee.raw.cpp
CommitLineData
f427ee49
A
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
11SharedPtr<T>
12return_raw_as_shared(T* ptr)
13{
14 return ptr;
15}