diff options
| author | bors <bors@rust-lang.org> | 2018-12-02 18:02:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-02 18:02:20 +0000 |
| commit | 21f26849506c141a6760532ca5bdfd8345247fdb (patch) | |
| tree | a9a9bbcf59c5b72c1d90d5e1ae9d8003b659deb7 /src/librustc_codegen_llvm/debuginfo | |
| parent | 8660eba2b9bec5b0fe971b7281f79e79c2df2fae (diff) | |
| parent | d108a913c79660ab375aff33ea9caa2885ba3051 (diff) | |
| download | rust-21f26849506c141a6760532ca5bdfd8345247fdb.tar.gz rust-21f26849506c141a6760532ca5bdfd8345247fdb.zip | |
Auto merge of #56198 - bjorn3:cg_ssa_refactor, r=eddyb
Refactor rustc_codegen_ssa cc #56108 (not all things are done yet) This removes an unsafe method from cg_ssa. r? @eddyb cc @sunfishcode
Diffstat (limited to 'src/librustc_codegen_llvm/debuginfo')
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/gdb.rs | 6 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/source_loc.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/gdb.rs b/src/librustc_codegen_llvm/debuginfo/gdb.rs index 0046a072366..4be93d826b8 100644 --- a/src/librustc_codegen_llvm/debuginfo/gdb.rs +++ b/src/librustc_codegen_llvm/debuginfo/gdb.rs @@ -24,11 +24,11 @@ use syntax::attr; /// Inserts a side-effect free instruction sequence that makes sure that the /// .debug_gdb_scripts global is referenced, so it isn't removed by the linker. pub fn insert_reference_to_gdb_debug_scripts_section_global(bx: &mut Builder) { - if needs_gdb_debug_scripts_section(bx.cx()) { - let gdb_debug_scripts_section = get_or_insert_gdb_debug_scripts_section_global(bx.cx()); + if needs_gdb_debug_scripts_section(bx) { + let gdb_debug_scripts_section = get_or_insert_gdb_debug_scripts_section_global(bx); // Load just the first byte as that's all that's necessary to force // LLVM to keep around the reference to the global. - let indices = [bx.cx().const_i32(0), bx.cx().const_i32(0)]; + let indices = [bx.const_i32(0), bx.const_i32(0)]; let element = bx.inbounds_gep(gdb_debug_scripts_section, &indices); let volative_load_instruction = bx.volatile_load(element); unsafe { diff --git a/src/librustc_codegen_llvm/debuginfo/source_loc.rs b/src/librustc_codegen_llvm/debuginfo/source_loc.rs index c6772e8c98e..95196287ab6 100644 --- a/src/librustc_codegen_llvm/debuginfo/source_loc.rs +++ b/src/librustc_codegen_llvm/debuginfo/source_loc.rs @@ -41,7 +41,7 @@ pub fn set_source_location<D>( }; let dbg_loc = if function_debug_context.source_locations_enabled.get() { - debug!("set_source_location: {}", bx.cx().sess().source_map().span_to_string(span)); + debug!("set_source_location: {}", bx.sess().source_map().span_to_string(span)); let loc = span_start(bx.cx(), span); InternalDebugLocation::new(scope.unwrap(), loc.line, loc.col.to_usize()) } else { @@ -76,7 +76,7 @@ pub fn set_debug_location( // For MSVC, set the column number to zero. // Otherwise, emit it. This mimics clang behaviour. // See discussion in https://github.com/rust-lang/rust/issues/42921 - let col_used = if bx.cx().sess().target.target.options.is_like_msvc { + let col_used = if bx.sess().target.target.options.is_like_msvc { UNKNOWN_COLUMN_NUMBER } else { col as c_uint |
