Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ codegen_llvm_symbol_already_defined =
codegen_llvm_target_machine = could not create LLVM TargetMachine for triple: {$triple}
codegen_llvm_target_machine_with_llvm_err = could not create LLVM TargetMachine for triple: {$triple}: {$llvm_err}

codegen_llvm_unknown_debuginfo_compression = unknown debuginfo compression algorithm {$algorithm} - will fall back to uncompressed debuginfo
codegen_llvm_unsupported_debuginfo_compression = unsupported debuginfo compression algorithm {$algorithm} - will fall back to uncompressed debuginfo

codegen_llvm_write_bytecode = failed to write bytecode to {$path}: {$err}

Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_codegen_llvm/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use crate::builder::SBuilder;
use crate::builder::gpu_offload::scalar_width;
use crate::common::AsCCharPtr;
use crate::errors::{
CopyBitcode, FromLlvmDiag, FromLlvmOptimizationDiag, LlvmError, UnknownCompression,
CopyBitcode, FromLlvmDiag, FromLlvmOptimizationDiag, LlvmError, UnsupportedCompression,
WithLlvmError, WriteBytecode,
};
use crate::llvm::diagnostic::OptimizationDiagnosticKind::*;
Expand Down Expand Up @@ -259,15 +259,15 @@ pub(crate) fn target_machine_factory(
if llvm::LLVMRustLLVMHasZlibCompression() {
llvm::CompressionKind::Zlib
} else {
sess.dcx().emit_warn(UnknownCompression { algorithm: "zlib" });
sess.dcx().emit_warn(UnsupportedCompression { algorithm: "zlib" });
llvm::CompressionKind::None
}
}
config::DebugInfoCompression::Zstd => {
if llvm::LLVMRustLLVMHasZstdCompression() {
llvm::CompressionKind::Zstd
} else {
sess.dcx().emit_warn(UnknownCompression { algorithm: "zstd" });
sess.dcx().emit_warn(UnsupportedCompression { algorithm: "zstd" });
llvm::CompressionKind::None
}
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_llvm/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ pub(crate) struct CopyBitcode {
}

#[derive(Diagnostic)]
#[diag(codegen_llvm_unknown_debuginfo_compression)]
pub(crate) struct UnknownCompression {
#[diag(codegen_llvm_unsupported_debuginfo_compression)]
pub(crate) struct UnsupportedCompression {
pub algorithm: &'static str,
}

Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/compressed-debuginfo/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn check_compression(compression: &str, to_find: &str) {
} else {
assert_contains(
stderr,
format!("unknown debuginfo compression algorithm {compression}"),
format!("unsupported debuginfo compression algorithm {compression}"),
);
}
});
Expand Down
Loading