This library implements the class DebuginfodCollection, which scans a set of directories for binaries, classifying them according to whether they contain debuginfo. This also provides the DebuginfodServer, an HTTPServer which serves debuginfod's /debuginfo and /executable endpoints. This is intended as the final new supporting library required for llvm-debuginfod.
As implemented here, DebuginfodCollection only finds ELF binaries and DWARF debuginfo. All other files are ignored. However, the class interface is format-agnostic. Generalizing to support other platforms will require refactoring of LLVM's object parsing libraries to eliminate use of report_fatal_error (e.g. when reading WASM files), so that the debuginfod daemon does not crash when it encounters a malformed file on the disk.
The DebuginfodCollection is tested by end-to-end tests of the debuginfod server (D114846).
I don't think the = 1 does anything, since providing a constructor inhibits generation of a default one.