I've experimented with the code for FileCheck that would
enable reporting a error when there are unknown check-prefixes.
E.g. when we have --check-prefixes=KNOWN,UNKNOWN, there is no error
reported about UNKNOWN.
The behavior looks wierd to me, but multiple-missing-prefixes.txt
and others FileCheck tests seems explicitly check this behavior.
Also there are about 1000 tests in LLVM
that have unused prefixes. Most of them lives in:
CodeGen/*
DebugInfo/X86/*
Instrumentation/*
Linker/*
MC/*
Other/*
Transforms/*
(A random example:
https://github.com/llvm/llvm-project/blob/master/llvm/test/CodeGen/PowerPC/srem-vector-lkk.ll has an excessive CHECK)
At the same time it is obvious that we do not want to have
dead prefixes in llvm/test/tools tests. I've fixed all what was able to find.
Note: this fixes patch-debug-dir.test.
This bit LGTM - oops and thanks.