Details

r332305 added a use of llvm::wasm::toString in llvm::object::WasmSymbol::print,
which is in a header file. It also moves toString to BinaryFormat. This has the
unintended side-effect that any inclusion of Object/Wasm.h now relies on
toString, and needs to required_libraries = BinaryFormat. Thankfully most builds
don't fail with this because print just isn't used and gets eliminated, dropping
the required dependency in the process. Not all builds are so lucky.

My rational with the original change is that anyone who depends on libObject is almost certainly also depending on libBinaryFormat (at the very least the headers). But your change makes thing nicer since it allows some users to avoid the explicit dependency on the lib I guess.

My rational with the original change is that anyone who depends on libObject is almost certainly also depending on libBinaryFormat (at the very least the headers). But your change makes thing nicer since it allows some users to avoid the explicit dependency on the lib I guess.

Also: compile-time. Anything I don't intend to get inlined I'd rather have in .cpp files.