diff options
| author | bors <bors@rust-lang.org> | 2020-03-08 05:27:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-08 05:27:21 +0000 |
| commit | f943349eafaa75a60c05b0c84dcdb771d0eae8c9 (patch) | |
| tree | 9e2d6e08dc1aff13d98144034e7db7080e6eb872 /src/librustc_codegen_llvm/debuginfo | |
| parent | 823ff8cf1397a5772b1f6954b60576202bf91836 (diff) | |
| parent | 8ee7278fca2cb137c81c8a12ca46c5df1838c2f3 (diff) | |
| download | rust-f943349eafaa75a60c05b0c84dcdb771d0eae8c9.tar.gz rust-f943349eafaa75a60c05b0c84dcdb771d0eae8c9.zip | |
Auto merge of #69804 - Centril:rollup-u86dc1g, r=Centril
Rollup of 8 pull requests Successful merges: - #69667 (Remove the `no_debug` feature) - #69687 (resolve, inconsistent binding mode: tweak wording) - #69708 (On mismatched delimiters, only point at empty blocks that are in the same line) - #69765 (reduce test size for Miri) - #69773 (fix various typos) - #69787 (mir::Local is Copy we can pass it by value in these cases) - #69794 (Add `Layout::dangling()` to return a well-aligned `NonNull<u8>`) - #69797 (Correct version that relaxed orphan rules) Failed merges: r? @ghost
Diffstat (limited to 'src/librustc_codegen_llvm/debuginfo')
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/metadata.rs | 6 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/mod.rs | 9 |
2 files changed, 2 insertions, 13 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs index 3916653eb1d..9e52598f2e0 100644 --- a/src/librustc_codegen_llvm/debuginfo/metadata.rs +++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs @@ -637,7 +637,7 @@ pub fn type_metadata(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>, usage_site_span: Sp unsafe { // The choice of type here is pretty arbitrary - // anything reading the debuginfo for a recursive - // type is going to see *somthing* weird - the only + // type is going to see *something* weird - the only // question is what exactly it will see. let (size, align) = cx.size_and_align_of(t); llvm::LLVMRustDIBuilderCreateBasicType( @@ -2269,10 +2269,6 @@ pub fn create_global_var_metadata(cx: &CodegenCx<'ll, '_>, def_id: DefId, global let tcx = cx.tcx; let attrs = tcx.codegen_fn_attrs(def_id); - if attrs.flags.contains(CodegenFnAttrFlags::NO_DEBUG) { - return; - } - let no_mangle = attrs.flags.contains(CodegenFnAttrFlags::NO_MANGLE); // We may want to remove the namespace scope if we're in an extern block (see // https://github.com/rust-lang/rust/pull/46457#issuecomment-351750952). diff --git a/src/librustc_codegen_llvm/debuginfo/mod.rs b/src/librustc_codegen_llvm/debuginfo/mod.rs index 6515d5e3bec..a68441f14cb 100644 --- a/src/librustc_codegen_llvm/debuginfo/mod.rs +++ b/src/librustc_codegen_llvm/debuginfo/mod.rs @@ -12,7 +12,6 @@ use crate::llvm; use crate::llvm::debuginfo::{ DIArray, DIBuilder, DIFile, DIFlags, DILexicalBlock, DISPFlags, DIScope, DIType, DIVariable, }; -use rustc::middle::codegen_fn_attrs::CodegenFnAttrFlags; use rustc::ty::subst::{GenericArgKind, SubstsRef}; use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, LOCAL_CRATE}; @@ -22,7 +21,7 @@ use crate::common::CodegenCx; use crate::value::Value; use rustc::mir; use rustc::session::config::{self, DebugInfo}; -use rustc::ty::{self, Instance, InstanceDef, ParamEnv, Ty}; +use rustc::ty::{self, Instance, ParamEnv, Ty}; use rustc_codegen_ssa::debuginfo::type_names; use rustc_codegen_ssa::mir::debuginfo::{DebugScope, FunctionDebugContext, VariableKind}; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; @@ -241,12 +240,6 @@ impl DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> { return None; } - if let InstanceDef::Item(def_id) = instance.def { - if self.tcx().codegen_fn_attrs(def_id).flags.contains(CodegenFnAttrFlags::NO_DEBUG) { - return None; - } - } - let span = mir.span; // This can be the case for functions inlined from another crate |
