Enable unused-function warning for runtime (#4628)

This commit is contained in:
Alexander Shabalin
2021-01-11 20:45:02 +03:00
committed by Nikolay Krasko
parent 8bb76c67e3
commit 32e3deace1
6 changed files with 12 additions and 35 deletions

View File

@@ -107,11 +107,13 @@ _Unwind_Reason_Code unwindCallback(
THREAD_LOCAL_VARIABLE bool disallowSourceInfo = false;
#if !OMIT_BACKTRACE && !USE_GCC_UNWIND
SourceInfo getSourceInfo(KConstRef stackTrace, int index) {
return disallowSourceInfo
? SourceInfo { .fileName = nullptr, .lineNumber = -1, .column = -1 }
: Kotlin_getSourceInfo(*PrimitiveArrayAddressOfElementAt<KNativePtr>(stackTrace->array(), index));
}
#endif
} // namespace