With -fsanitize=kcfi, Clang emits a !kcfi_type attribute for all
global functions, making them valid indirect call targets, whether
the program ends up calling them indirectly or not. With LTO, we can
"seal" the program by dropping types from non-address-taken globals
as long as they are not visible to regular objects, thus limiting the
possible targets that can be called.
Propagate the VisibleToRegularObj property from the linker to LLVM
passes, and drop KCFI type information from globals that don't need
it.
Depends on D142163