@@ -128,7 +128,7 @@ static uint16_t RuntimeFunctionCountersOffsets[] = {
128128// / Public APIs
129129
130130// / Get the runtime object state associated with an object.
131- void _swift_getObjectRuntimeFunctionCounters (
131+ SWIFT_CC (swift) void _swift_getObjectRuntimeFunctionCounters(
132132 HeapObject *object, RuntimeFunctionCountersState *result) {
133133 auto &theSentinel = RuntimeObjectStateCache.get ();
134134 StaticScopedReadLock lock (theSentinel.Lock );
@@ -137,7 +137,7 @@ void _swift_getObjectRuntimeFunctionCounters(
137137
138138// / Set the runtime object state associated with an object from a provided
139139// / state.
140- void _swift_setObjectRuntimeFunctionCounters (
140+ SWIFT_CC (swift) void _swift_setObjectRuntimeFunctionCounters(
141141 HeapObject *object, RuntimeFunctionCountersState *state) {
142142 auto &theSentinel = RuntimeObjectStateCache.get ();
143143 StaticScopedWriteLock lock (theSentinel.Lock );
@@ -146,14 +146,14 @@ void _swift_setObjectRuntimeFunctionCounters(
146146
147147// / Get the global runtime state containing the total numbers of invocations for
148148// / each runtime function of interest.
149- void _swift_getGlobalRuntimeFunctionCounters (
149+ SWIFT_CC (swift) void _swift_getGlobalRuntimeFunctionCounters(
150150 RuntimeFunctionCountersState *result) {
151151 StaticScopedReadLock lock (RuntimeGlobalFunctionCountersState.Lock );
152152 *result = RuntimeGlobalFunctionCountersState.State ;
153153}
154154
155155// / Set the global runtime state of function pointers from a provided state.
156- void _swift_setGlobalRuntimeFunctionCounters (
156+ SWIFT_CC (swift) void _swift_setGlobalRuntimeFunctionCounters(
157157 RuntimeFunctionCountersState *state) {
158158 StaticScopedWriteLock lock (RuntimeGlobalFunctionCountersState.Lock );
159159 RuntimeGlobalFunctionCountersState.State = *state;
@@ -162,19 +162,19 @@ void _swift_setGlobalRuntimeFunctionCounters(
162162// / Return the names of the runtime functions being tracked.
163163// / Their order is the same as the order of the counters in the
164164// / RuntimeObjectState structure. All these strings are null terminated.
165- const char **_swift_getRuntimeFunctionNames () {
165+ SWIFT_CC (swift) const char **_swift_getRuntimeFunctionNames() {
166166 return RuntimeFunctionNames;
167167}
168168
169169// / Return the offsets of the runtime function counters being tracked.
170170// / Their order is the same as the order of the counters in the
171171// / RuntimeObjectState structure.
172- const uint16_t *_swift_getRuntimeFunctionCountersOffsets () {
172+ SWIFT_CC (swift) const uint16_t *_swift_getRuntimeFunctionCountersOffsets() {
173173 return RuntimeFunctionCountersOffsets;
174174}
175175
176176// / Return the number of runtime functions being tracked.
177- uint64_t _swift_getNumRuntimeFunctionCounters () {
177+ SWIFT_CC (swift) uint64_t _swift_getNumRuntimeFunctionCounters() {
178178 return ID_LastRuntimeFunctionName;
179179}
180180
@@ -202,15 +202,15 @@ void _swift_dumpObjectsRuntimeFunctionPointers() {
202202
203203// / Set mode for global runtime function counters.
204204// / Return the old value of this flag.
205- int _swift_setGlobalRuntimeFunctionCountersMode (int mode) {
205+ SWIFT_CC (swift) int _swift_setGlobalRuntimeFunctionCountersMode(int mode) {
206206 int oldMode = UpdateGlobalRuntimeFunctionCounters;
207207 UpdateGlobalRuntimeFunctionCounters = mode ? 1 : 0 ;
208208 return oldMode;
209209}
210210
211211// / Set mode for per object runtime function counters.
212212// / Return the old value of this flag.
213- int _swift_setPerObjectRuntimeFunctionCountersMode (int mode) {
213+ SWIFT_CC (swift) int _swift_setPerObjectRuntimeFunctionCountersMode(int mode) {
214214 int oldMode = UpdatePerObjectRuntimeFunctionCounters;
215215 UpdatePerObjectRuntimeFunctionCounters = mode ? 1 : 0 ;
216216 return oldMode;
0 commit comments