We allow tools to be called {tool}-{suffix} to support tools being
called something like clang-17. Many clang tools follow this pattern
too for example, clang-scan-deps. It is pure luck wether clang or
clang-scan-deps will appear first in the LLVMDriverTools.def file. If
the former appears first, clang-scan-deps will match against clang,
which is not preferable. Instead we can control the order that tools
are checked so that we always look at more specific tool names first.
Details
Details
- Reviewers
phosek MaskRay - Commits
- rGf1da04b7357b: [llvm-driver] Check more specific tools first
Diff Detail
Diff Detail
This leaves a dynamic initialization. It'd be better to keep LLVMDriverTools.def and reverse iterate ToolMap.