Recommit: "[llvm-exegesis] Improve error reporting in Assembler.cpp"
Summary: Commit 63bb9fee525f8f29fd9c2174fa7f15573c3d1fd7 was reverted in
7603bfb4b0a6a90137d47f0182a490fe54bf7ca3 because it broke builds that treat
warnings as errors.
This commit updates the calls to assembleToStream() in tests to check that
the return value is valid.
Original commit message:
Followup to D74084.
Replace the use of report_fatal_error() with returning the error to
llvm-exegesis.cpp and handling it there.
Differential Revision: https://reviews.llvm.org/D74325