about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo
diff options
context:
space:
mode:
authorIrina Popa <irinagpopa@gmail.com>2018-07-02 17:52:53 +0300
committerIrina Popa <irinagpopa@gmail.com>2018-07-30 18:36:29 +0300
commitd04e66d1144a66198422dd380254e8e943d46a49 (patch)
tree2749a2b06c7698422d9c2d59cb7cf845075923f5 /src/librustc_codegen_llvm/debuginfo
parent249d5acaec0b10ee15b21b888977b5445baba42e (diff)
downloadrust-d04e66d1144a66198422dd380254e8e943d46a49.tar.gz
rust-d04e66d1144a66198422dd380254e8e943d46a49.zip
rustc_codegen_llvm: use safe references for Type.
Diffstat (limited to 'src/librustc_codegen_llvm/debuginfo')
-rw-r--r--src/librustc_codegen_llvm/debuginfo/gdb.rs2
-rw-r--r--src/librustc_codegen_llvm/debuginfo/mod.rs18
-rw-r--r--src/librustc_codegen_llvm/debuginfo/utils.rs3
3 files changed, 12 insertions, 11 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/gdb.rs b/src/librustc_codegen_llvm/debuginfo/gdb.rs
index 4014ad95b9d..de43a4522cc 100644
--- a/src/librustc_codegen_llvm/debuginfo/gdb.rs
+++ b/src/librustc_codegen_llvm/debuginfo/gdb.rs
@@ -54,7 +54,7 @@ pub fn get_or_insert_gdb_debug_scripts_section_global(cx: &CodegenCx)
         let section_contents = b"\x01gdb_load_rust_pretty_printers.py\0";
 
         unsafe {
-            let llvm_type = Type::array(&Type::i8(cx),
+            let llvm_type = Type::array(Type::i8(cx),
                                         section_contents.len() as u64);
 
             let section_var = declare::define_global(cx, section_var_name,
diff --git a/src/librustc_codegen_llvm/debuginfo/mod.rs b/src/librustc_codegen_llvm/debuginfo/mod.rs
index d4b51106033..3336e46ea79 100644
--- a/src/librustc_codegen_llvm/debuginfo/mod.rs
+++ b/src/librustc_codegen_llvm/debuginfo/mod.rs
@@ -471,14 +471,16 @@ pub fn create_function_debug_context<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>,
     }
 }
 
-pub fn declare_local<'a, 'tcx>(bx: &Builder<'a, 'tcx>,
-                               dbg_context: &FunctionDebugContext,
-                               variable_name: ast::Name,
-                               variable_type: Ty<'tcx>,
-                               scope_metadata: DIScope,
-                               variable_access: VariableAccess,
-                               variable_kind: VariableKind,
-                               span: Span) {
+pub fn declare_local(
+    bx: &Builder<'a, 'll, 'tcx>,
+    dbg_context: &FunctionDebugContext,
+    variable_name: ast::Name,
+    variable_type: Ty<'tcx>,
+    scope_metadata: DIScope,
+    variable_access: VariableAccess,
+    variable_kind: VariableKind,
+    span: Span,
+) {
     assert!(!dbg_context.get_ref(span).source_locations_enabled.get());
     let cx = bx.cx;
 
diff --git a/src/librustc_codegen_llvm/debuginfo/utils.rs b/src/librustc_codegen_llvm/debuginfo/utils.rs
index 85cddb0a580..69d457f2188 100644
--- a/src/librustc_codegen_llvm/debuginfo/utils.rs
+++ b/src/librustc_codegen_llvm/debuginfo/utils.rs
@@ -49,8 +49,7 @@ pub fn span_start(cx: &CodegenCx, span: Span) -> syntax_pos::Loc {
 }
 
 #[inline]
-pub fn debug_context<'a, 'tcx>(cx: &'a CodegenCx<'a, 'tcx>)
-                           -> &'a CrateDebugContext<'a, 'tcx> {
+pub fn debug_context(cx: &'a CodegenCx<'ll, 'tcx>) -> &'a CrateDebugContext<'a, 'tcx> {
     cx.dbg_cx.as_ref().unwrap()
 }