Remove unused OutputType::ThinLinkBitcode

This commit is contained in:
DianQK 2025-02-06 22:01:08 +08:00
parent da50297a6e
commit a897cc0351
No known key found for this signature in database
3 changed files with 2 additions and 16 deletions

View file

@ -210,7 +210,7 @@ fn produce_final_output_artifacts(
// to get rid of it.
for output_type in crate_output.outputs.keys() {
match *output_type {
OutputType::Bitcode | OutputType::ThinLinkBitcode | OutputType::ThinBitcode => {
OutputType::Bitcode | OutputType::ThinLinkBitcode => {
// Cranelift doesn't have bitcode
// user_wants_bitcode = true;
// // Copy to .bc, but always keep the .0.bc. There is a later

View file

@ -630,9 +630,6 @@ fn produce_final_output_artifacts(
// them for making an rlib.
copy_if_one_unit(OutputType::Bitcode, true);
}
OutputType::ThinBitcode => {
copy_if_one_unit(OutputType::ThinBitcode, true);
}
OutputType::ThinLinkBitcode => {
copy_if_one_unit(OutputType::ThinLinkBitcode, false);
}

View file

@ -544,9 +544,6 @@ pub enum OutputType {
Bitcode,
/// This is the summary or index data part of the ThinLTO bitcode.
ThinLinkBitcode,
/// This is ThinLTO's pre-link bitcode, primarily used for embedding bitcode in object files.
/// This can also be used for FatLTO.
ThinBitcode,
Assembly,
LlvmAssembly,
Mir,
@ -577,7 +574,6 @@ impl OutputType {
OutputType::Exe | OutputType::DepInfo | OutputType::Metadata => true,
OutputType::Bitcode
| OutputType::ThinLinkBitcode
| OutputType::ThinBitcode
| OutputType::Assembly
| OutputType::LlvmAssembly
| OutputType::Mir
@ -589,7 +585,6 @@ impl OutputType {
match *self {
OutputType::Bitcode => "llvm-bc",
OutputType::ThinLinkBitcode => "thin-link-bitcode",
OutputType::ThinBitcode => "thin-llvm-bc",
OutputType::Assembly => "asm",
OutputType::LlvmAssembly => "llvm-ir",
OutputType::Mir => "mir",
@ -607,7 +602,6 @@ impl OutputType {
"mir" => OutputType::Mir,
"llvm-bc" => OutputType::Bitcode,
"thin-link-bitcode" => OutputType::ThinLinkBitcode,
"thin-llvm-bc" => OutputType::ThinBitcode,
"obj" => OutputType::Object,
"metadata" => OutputType::Metadata,
"link" => OutputType::Exe,
@ -618,10 +612,9 @@ impl OutputType {
fn shorthands_display() -> String {
format!(
"`{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`",
"`{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`",
OutputType::Bitcode.shorthand(),
OutputType::ThinLinkBitcode.shorthand(),
OutputType::ThinBitcode.shorthand(),
OutputType::Assembly.shorthand(),
OutputType::LlvmAssembly.shorthand(),
OutputType::Mir.shorthand(),
@ -636,7 +629,6 @@ impl OutputType {
match *self {
OutputType::Bitcode => "bc",
OutputType::ThinLinkBitcode => "indexing.o",
OutputType::ThinBitcode => "thin.bc",
OutputType::Assembly => "s",
OutputType::LlvmAssembly => "ll",
OutputType::Mir => "mir",
@ -655,7 +647,6 @@ impl OutputType {
| OutputType::DepInfo => true,
OutputType::Bitcode
| OutputType::ThinLinkBitcode
| OutputType::ThinBitcode
| OutputType::Object
| OutputType::Metadata
| OutputType::Exe => false,
@ -743,7 +734,6 @@ impl OutputTypes {
self.0.keys().any(|k| match *k {
OutputType::Bitcode
| OutputType::ThinLinkBitcode
| OutputType::ThinBitcode
| OutputType::Assembly
| OutputType::LlvmAssembly
| OutputType::Mir
@ -758,7 +748,6 @@ impl OutputTypes {
self.0.keys().any(|k| match *k {
OutputType::Bitcode
| OutputType::ThinLinkBitcode
| OutputType::ThinBitcode
| OutputType::Assembly
| OutputType::LlvmAssembly
| OutputType::Mir