2 * \file Declarations of MonoClass field offset functions
3 * Copyright 2018 Microsoft
4 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
6 #ifndef __MONO_METADATA_CLASS_ABI_DETAILS_H__
7 #define __MONO_METADATA_CLASS_ABI_DETAILS_H__
9 #include <mono/metadata/class-internals.h>
10 #include <mono/metadata/abi-details.h>
12 #define MONO_CLASS_GETTER(funcname, rettype, optref, argtype, fieldname) /*nothing*/
14 * In-tree profilers are allowed to use the offset functions. So if we're
15 * compiling with --enable-checked-build=private_types, mark the symbols with
18 #ifdef MONO_CLASS_DEF_PRIVATE
19 #define MONO_CLASS_OFFSET(funcname, argtype, fieldname) MONO_PROFILER_API intptr_t funcname (void);
21 #define MONO_CLASS_OFFSET(funcname, argtype, fieldname) static inline intptr_t funcname (void) { return MONO_STRUCT_OFFSET (argtype, fieldname); }
23 #include "class-getters.h"
24 #undef MONO_CLASS_GETTER
25 #undef MONO_CLASS_OFFSET
27 #endif /* __MONO_METADATA_CLASS_ABI_DETAILS_H__ */