Skip to content

Commit acff321

Browse files
committed
Add a comment explaining why the file needs to be compiled even in no-asserts builds
1 parent 51bb830 commit acff321

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stdlib/public/runtime/RuntimeInvocationsTracking.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
#include "RuntimeInvocationsTracking.h"
2020
#include "swift/Runtime/HeapObject.h"
2121

22+
// This file is compiled always, even if assertions are disabled and no runtime
23+
// functions are being tracked. This is done to avoid recompiling Swift clients
24+
// using these APIs. They should be able to link against the standard library
25+
// independent of the fact whether assertions are enabled or not.
26+
2227
#define SWIFT_RT_FUNCTION_INVOCATION_COUNTER_NAME(RT_FUNCTION) \
2328
invocationCounter_##RT_FUNCTION
2429

0 commit comments

Comments
 (0)