Should I expend the effort to generalize via patterns in order to quietly absorb future load-command expansions?
The reason those tests use hardcoded offsets instead of FileCheck's numeric substitutions is because of little-endianness. I'm not sure how they can be generalized while still checking for the things we care about. (Well, this is true for local-got.s at least. relocations.s just seems to be checking the little-endian encodings of the addresses, but doesn't check that it matches the big-endian form... this was an oversight)
codebase convention is not to prefix member variables
nit: add spaces to align with column
nit: const ref
JFYI, [[#]] will also match any number: https://llvm.org/docs/CommandGuide/FileCheck.html#filecheck-numeric-substitution-blocks
This macro is a bit overly restrictive: our version of lld does not start with a leading 1 and fails this test.
I relaxed it in https://github.com/llvm/llvm-project/commit/22cbe40fa99795766f352c08a7c0748704c9d2d5 for now, if you would like a more specific checks I can propose this instead https://reviews.llvm.org/D86026 ?