[FileCheck] Refactor -dump-input test
This patch refactors `llvm/test/FileCheck/dump-input/annotations.txt`
to improve maintainability and coverage and to prepare for the
upcoming implementation of search range annotations.
Lit substitutions
=================
The test repeats the same basic set of RUN lines *many* times. This
patch encapsulates those in lit substitutions to improve
maintainability. By doing so, it also helps to ensure more consistent
coverage of all cases and thus slightly expands coverage.
-strict-whitespace
==================
Via those substitutions, this patch adds `-strict-whitespace`
throughout the test, and it drops the initial `-strict-whitespace`
[27 lines not shown]
sys/mount.h: restore KNF_NOKQLOCK in VFS_KNOTE_{,UN}LOCKED() call to KNOTE()
ZFS needs to take internal sleepable lock in its implementation of
VOP_GETATTR(). Due to this, kq must be unlocked around calls to the vfs
filter methods.
Fixes: 1d5e4020e36e ("vnode: add VIRF_KNOTE flag")
Reported and tested by: des
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
[FileCheck] Resurrect overflow tests
D150880 (landed as 0726cb004718) uses `APInt` to eliminate most
integer overflow issues from FileCheck numeric variables. It also
removes the 4 tests in
`llvm/test/FileCheck/match-time-error-propagation`.
While the elimination of overflow issues reduces the importance of
those tests, the tests still seem worthwhile. Without them, I see no
test that exercises the "unable to substitute variable or numeric
expression: overflow error" diagnostic in FileCheck input dumps.
This patch resurrects those tests and updates them to exercise the
remaining unsigned underflow case.
[ELF] Remove redundant memset in SymbolTable::insert. NFC (#198132)
make<SymbolUnion>() value-initializes the union, zero-initializing all
sizeof(SymbolUnion) bytes. The following memset(sym, 0, sizeof(Symbol))
is therefore redundant.
This placeholder path runs no Symbol constructor, so it was not covered
by the constructor initialization in
905a88b923433eb8cd83677ea55bee82eb9ba498.
[X86] isExtractSubvectorCheap - fix typo in vXi1 extraction test (#198127)
Fix typo in check for ResVT subvector being half the size of the SrcVT vector (instead of vice-versa).
Fixes #195695
x86: remove sys/mount.h from genassym.c
The header is not needed, and causes some issues with build because it
requires vnode_if.h generated due to transient dependency from vnode.h.
While there, remove unneeded explicit sys/cdefs.h and sys/param.h usage.
Reported and tested by: thierry
Fixes: 1d5e4020e36e ("vnode: add VIRF_KNOTE flag")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
[ELF] Initialize Symbol fields in the constructor instead of via memset (#198129)
`initSectionsAndLocalSyms` and `makeDefined` memset the storage to zero
and then placement-new a Symbol-derived object into it. Placement new
begins a new object's lifetime. The standard does not seem to guarantee
the memset bytes carry into members the constructor leaves
uninitialized.
lld built by GCC 16 can make Valgrind report reads of Symbol::flags
(via getSymSectionIndex during finalizeSections) as uses of
uninitialized values (ClangBuiltLinux/linux#2162).
This patch reinstates the per-field initialization that commit
778742760534 ("[ELF] Avoid redundant assignment to Symbol fields. NFC")
had replaced with a bulk memset.