[Clang][CFI] Skip unused diagnostic data in trap and minimal-runtime vtable checks (#241640)
`EmitVTableCheck` emitted the static diagnostic data and, without
cross-DSO CFI, an `"all-vtables"` type test before deciding how to
report
a failure. Trap mode and the minimal runtime use neither, so they were
left as dead globals and instructions. Local trap mode also called
`EmitTrapCheck` directly instead of `EmitCheck`, so
`-fsanitize-skip-hot-cutoff` and `-ubsan-guard-checks` did not apply to
vtable checks.
Skip the static diagnostic data in trap mode and local minimal-runtime
checks, emit the `"all-vtables"` test only for local full-runtime
checks, and route local trap and minimal-runtime checks through
`EmitCheck`.
Assisted-by: Gemini