[ThinLTO][NFC] Use a switch for ImportKind in exportToDot (#233610)
`ModuleSummaryIndex::exportToDot` used an if/else-if chain to choose the
"definition" or "declaration" comment for each summary. `ImportKind` has
only these two enumerators, so the else-if condition is always true when
it is reached.
Switch on the enum-typed `importType()` instead, without a `default`
label, so that `-Wswitch` flags this code if a new `ImportKind` is
added. With the previous code a new kind would silently get no comment.
No new test, since this is NFC. The dot-dumper tests in
llvm/test/ThinLTO/X86 exercise this function, and `dot-dumper.ll` is the
only test that checks these comments. They pass, as does `check-llvm`.
Assisted-by: Claude Code