Skip to content

Commit

Permalink
Rollup merge of #94672 - joedeandev:master, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Improved error message for failed bitcode load

"bc" is an unnecessary shorthand that obfuscates the compilation error
  • Loading branch information
matthiaskrgr committed Mar 6, 2022
2 parents e8f38a0 + 0e604a7 commit 0480a32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ fn fat_lto(
info!("linking {:?}", name);
let data = bc_decoded.data();
linker.add(data).map_err(|()| {
let msg = format!("failed to load bc of {:?}", name);
let msg = format!("failed to load bitcode of module {:?}", name);
write::llvm_err(diag_handler, &msg)
})?;
serialized_bitcode.push(bc_decoded);
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/lto/lto-duplicate-symbols.stderr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
warning: Linking globals named 'foo': symbol multiply defined!

error: failed to load bc of "lto-duplicate-symbols2.lto_duplicate_symbols2.HASH-cgu.0.rcgu.o":
error: failed to load bitcode of module "lto-duplicate-symbols2.lto_duplicate_symbols2.HASH-cgu.0.rcgu.o":

error: aborting due to previous error; 1 warning emitted

0 comments on commit 0480a32

Please sign in to comment.