Skip to content

Commit 99262f5

Browse files
committed
Move quote_command_line_args into cg_ssa
1 parent ae12bc2 commit 99262f5

File tree

6 files changed

+5
-4
lines changed

6 files changed

+5
-4
lines changed

compiler/rustc_codegen_llvm/src/back/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
pub(crate) mod archive;
2-
mod command_line_args;
32
pub(crate) mod lto;
43
pub(crate) mod owned_target_machine;
54
mod profiling;

compiler/rustc_codegen_llvm/src/back/write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use rustc_codegen_ssa::back::write::{
1616
TargetMachineFactoryFn,
1717
};
1818
use rustc_codegen_ssa::base::wants_wasm_eh;
19+
use rustc_codegen_ssa::debuginfo::command_line_args::quote_command_line_args;
1920
use rustc_codegen_ssa::traits::*;
2021
use rustc_codegen_ssa::{CompiledModule, ModuleCodegen, ModuleKind};
2122
use rustc_data_structures::profiling::SelfProfilerRef;
@@ -31,7 +32,6 @@ use rustc_span::{BytePos, InnerSpan, Pos, SpanData, SyntaxContext, sym};
3132
use rustc_target::spec::{CodeModel, FloatAbi, RelocModel, SanitizerSet, SplitDebuginfo, TlsModel};
3233
use tracing::{debug, trace};
3334

34-
use crate::back::command_line_args::quote_command_line_args;
3535
use crate::back::lto::ThinBuffer;
3636
use crate::back::owned_target_machine::OwnedTargetMachine;
3737
use crate::back::profiling::{

compiler/rustc_codegen_llvm/src/back/command_line_args.rs renamed to compiler/rustc_codegen_ssa/src/debuginfo/command_line_args/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ mod tests;
66
///
77
/// The result is intended to be informational, for embedding in debug metadata,
88
/// and might not be properly quoted/escaped for actual command-line use.
9-
pub(crate) fn quote_command_line_args(args: &[String]) -> String {
9+
pub fn quote_command_line_args(args: &[String]) -> String {
1010
// Start with a decent-sized buffer, since rustc invocations tend to be long.
1111
let mut buf = String::with_capacity(128);
1212

File renamed without changes.

compiler/rustc_codegen_ssa/src/debuginfo/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use rustc_middle::bug;
33
use rustc_middle::ty::layout::{IntegerExt, PrimitiveExt, TyAndLayout};
44
use rustc_middle::ty::{self, Ty, TyCtxt};
55

6-
// FIXME(eddyb) find a place for this (or a way to replace it).
6+
pub mod command_line_args;
77
pub mod type_names;
88

99
/// Returns true if we want to generate a DW_TAG_enumeration_type description for

compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! Type Names for Debug Info.
22
3+
// FIXME(eddyb) find a place for this (or a way to replace it).
4+
35
// Notes on targeting MSVC:
46
// In general, MSVC's debugger attempts to parse all arguments as C++ expressions,
57
// even if the argument is explicitly a symbol name.

0 commit comments

Comments
 (0)