casaroli commented on code in PR #21351:
URL: https://github.com/apache/nuttx/pull/21351#discussion_r4448848048
##########
libs/libbuiltin/compiler-rt/InstrProfilingPlatform.c:
##########
@@ -121,19 +121,49 @@ char *__llvm_profile_end_bitmap(void)
}
COMPILER_RT_VISIBILITY
-uint32_t *__llvm_profile_begin_orderfile(void)
+ValueProfNode *__llvm_profile_begin_vnodes(void)
{
return 0;
}
COMPILER_RT_VISIBILITY
-ValueProfNode *__llvm_profile_begin_vnodes(void)
+ValueProfNode *__llvm_profile_end_vnodes(void)
{
return 0;
}
COMPILER_RT_VISIBILITY
-ValueProfNode *__llvm_profile_end_vnodes(void)
+const VTableProfData *__llvm_profile_begin_vtables(void)
Review Comment:
With `CONFIG_LIB_COMPILER_RT_VERSION="17.0.1"` and
`CONFIG_COVERAGE_COMPILER_RT=y`, this file does not compile any more: the
17.0.1 `InstrProfiling.h` does not define `VTableProfData` and
`__llvm_gcov_init_func_struct` ("unknown type name", lines 136, 142, 160, 166).
The 21.1.1 default does not help a clang 17 user (the CI clang is 17.0.1): its
profile runtime uses raw version 10 and a larger `__llvm_profile_data` than
clang 17 emits. So `COVERAGE_COMPILER_RT` has no working version for clang 17
after this change.
Fix: put the 4 vtable stubs in `#ifdef INSTR_PROF_VTAB_COMMON` and the 2
covinit stubs in `#ifdef INSTR_PROF_COVINIT_COMMON`, so that the file compiles
with the 17.0.1 and the 21.1.1 headers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]