about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2019-01-22 13:01:14 -0800
committerJosh Stone <jistone@redhat.com>2019-01-25 15:39:54 -0800
commitcff075009032d11cff3a625663cf460e71e81609 (patch)
treefb848d992fd4db22b2e04ac5f8e898f5d07d6ef9 /src/librustc_codegen_llvm/debuginfo
parent75d0bceb0aaa399a9c8de2913dd78cc6df295222 (diff)
downloadrust-cff075009032d11cff3a625663cf460e71e81609.tar.gz
rust-cff075009032d11cff3a625663cf460e71e81609.zip
Set the DICompileUnit emissionKind
Diffstat (limited to 'src/librustc_codegen_llvm/debuginfo')
-rw-r--r--src/librustc_codegen_llvm/debuginfo/metadata.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
index 9f63038c362..3a7864cb7a5 100644
--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
+++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
@@ -13,7 +13,7 @@ use value::Value;
 
 use llvm;
 use llvm::debuginfo::{DIArray, DIType, DIFile, DIScope, DIDescriptor,
-                      DICompositeType, DILexicalBlock, DIFlags};
+                      DICompositeType, DILexicalBlock, DIFlags, DebugEmissionKind};
 use llvm_util;
 
 use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
@@ -846,6 +846,7 @@ pub fn compile_unit_metadata(tcx: TyCtxt,
     let producer = CString::new(producer).unwrap();
     let flags = "\0";
     let split_name = "\0";
+    let kind = DebugEmissionKind::from_generic(tcx.sess.opts.debuginfo);
 
     unsafe {
         let file_metadata = llvm::LLVMRustDIBuilderCreateFile(
@@ -859,7 +860,8 @@ pub fn compile_unit_metadata(tcx: TyCtxt,
             tcx.sess.opts.optimize != config::OptLevel::No,
             flags.as_ptr() as *const _,
             0,
-            split_name.as_ptr() as *const _);
+            split_name.as_ptr() as *const _,
+            kind);
 
         if tcx.sess.opts.debugging_opts.profile {
             let cu_desc_metadata = llvm::LLVMRustMetadataAsValue(debug_context.llcontext,