about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2018-07-26 11:41:10 -0600
committerMark Rousskov <mark.simulacrum@gmail.com>2018-08-04 06:54:34 -0600
commit2bc71971e5d91834d165b80b16858a49c9e00aba (patch)
treeed8f669426901c0788ca05dbe9ee5cb8fcb70b83 /src/librustc_codegen_llvm/debuginfo
parent442a4744e38136b79f818833d784145eb952b26a (diff)
Normalize DebugInfoLevel to standard style
Diffstat (limited to 'src/librustc_codegen_llvm/debuginfo')
-rw-r--r--src/librustc_codegen_llvm/debuginfo/gdb.rs4
-rw-r--r--src/librustc_codegen_llvm/debuginfo/mod.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/gdb.rs b/src/librustc_codegen_llvm/debuginfo/gdb.rs
index 08128a729b5..f6faddb894f 100644
--- a/src/librustc_codegen_llvm/debuginfo/gdb.rs
+++ b/src/librustc_codegen_llvm/debuginfo/gdb.rs
@@ -15,7 +15,7 @@ use llvm;
 use common::{C_bytes, CodegenCx, C_i32};
 use builder::Builder;
 use declare;
-use rustc::session::config::NoDebugInfo;
+use rustc::session::config::DebugInfo;
 use type_::Type;
 use value::Value;
 
@@ -81,6 +81,6 @@ pub fn needs_gdb_debug_scripts_section(cx: &CodegenCx) -> bool {
                             "omit_gdb_pretty_printer_section");
 
     !omit_gdb_pretty_printer_section &&
-    cx.sess().opts.debuginfo != NoDebugInfo &&
+    cx.sess().opts.debuginfo != DebugInfo::None &&
     cx.sess().target.target.options.emit_debug_gdb_scripts
 }
diff --git a/src/librustc_codegen_llvm/debuginfo/mod.rs b/src/librustc_codegen_llvm/debuginfo/mod.rs
index 143b122a5a1..d4fb2549a75 100644
--- a/src/librustc_codegen_llvm/debuginfo/mod.rs
+++ b/src/librustc_codegen_llvm/debuginfo/mod.rs
@@ -32,7 +32,7 @@ use builder::Builder;
 use monomorphize::Instance;
 use rustc::ty::{self, ParamEnv, Ty, InstanceDef};
 use rustc::mir;
-use rustc::session::config::{self, FullDebugInfo, LimitedDebugInfo, NoDebugInfo};
+use rustc::session::config::{self, DebugInfo};
 use rustc::util::nodemap::{DefIdMap, FxHashMap, FxHashSet};
 use value::Value;
 
@@ -214,7 +214,7 @@ pub fn create_function_debug_context(
     llfn: &'ll Value,
     mir: &mir::Mir,
 ) -> FunctionDebugContext<'ll> {
-    if cx.sess().opts.debuginfo == NoDebugInfo {
+    if cx.sess().opts.debuginfo == DebugInfo::None {
         return FunctionDebugContext::DebugInfoDisabled;
     }
 
@@ -314,7 +314,7 @@ pub fn create_function_debug_context(
         cx: &CodegenCx<'ll, 'tcx>,
         sig: ty::FnSig<'tcx>,
     ) -> &'ll DIArray {
-        if cx.sess().opts.debuginfo == LimitedDebugInfo {
+        if cx.sess().opts.debuginfo == DebugInfo::Limited {
             return create_DIArray(DIB(cx), &[]);
         }
 
@@ -400,7 +400,7 @@ pub fn create_function_debug_context(
         name_to_append_suffix_to.push('>');
 
         // Again, only create type information if full debuginfo is enabled
-        let template_params: Vec<_> = if cx.sess().opts.debuginfo == FullDebugInfo {
+        let template_params: Vec<_> = if cx.sess().opts.debuginfo == DebugInfo::Full {
             let names = get_parameter_names(cx, generics);
             substs.iter().zip(names).filter_map(|(kind, name)| {
                 if let UnpackedKind::Type(ty) = kind.unpack() {