Files
swift-mirror/test/Interop/Cxx/reference/Inputs/reference.h
zoecarver 317272852b [cxx-interop] Bail if the type a reference type is wrapping is unkown.
If we can't find the type a reference type is wrapping (the pointee
type), then don't import that type instead of crashing later.
2020-11-01 12:55:44 -08:00

24 lines
755 B
C

#ifndef TEST_INTEROP_CXX_REFERENCE_INPUTS_REFERENCE_H
#define TEST_INTEROP_CXX_REFERENCE_INPUTS_REFERENCE_H
int getStaticInt();
int &getStaticIntRef();
int &&getStaticIntRvalueRef();
const int &getConstStaticIntRef();
const int &&getConstStaticIntRvalueRef();
void setStaticInt(int);
void setStaticIntRef(int &);
void setStaticIntRvalueRef(int &&);
void setConstStaticIntRef(const int &);
void setConstStaticIntRvalueRef(const int &&);
auto getFuncRef() -> int (&)();
auto getFuncRvalueRef() -> int (&&)();
// We cannot import "_Atomic" types. Make sure we fail gracefully instead of
// crashing when we have an "_Atomic" type or a reference to one.
void dontImportAtomicRef(_Atomic(int)&) { }
#endif // TEST_INTEROP_CXX_REFERENCE_INPUTS_REFERENCE_H