about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-3645/+0
2020-08-17rust_ast::ast => rustc_astUjjwal Sharma-1/+1
2020-08-10Merge branch 'master' into feature/incorporate-tracingpawanbisht62-5/+6
2020-08-08Auto merge of #74932 - nnethercote:rm-ast-session-globals, r=petrochenkovbors-3/+4
Remove `librustc_ast` session globals By moving the data onto `Session`. r? @petrochenkov
2020-08-08Eliminate the `SessionGlobals` from `librustc_ast`.Nicholas Nethercote-3/+4
By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This means they are accessed via the `Session`, rather than via TLS. A few `Attr` methods and `librustc_ast` functions are now methods of `Session`. All of this required passing a `Session` to lots of functions that didn't already have one. Some of these functions also had arguments removed, because those arguments could be accessed directly via the `Session` argument. `contains_feature_attr()` was dead, and is removed. Some functions were moved from `librustc_ast` elsewhere because they now need to access `Session`, which isn't available in that crate. - `entry_point_type()` --> `librustc_builtin_macros` - `global_allocator_spans()` --> `librustc_metadata` - `is_proc_macro_attr()` --> `Session`
2020-08-08fix clippy::needless_return: remove unneeded return statementsMatthias Krüger-2/+2
2020-08-06Incorporate tracing cratebishtpawan-2/+2
2020-07-20mir: `unused_generic_params` queryDavid Wood-1/+1
This commit implements the `unused_generic_params` query, an initial version of polymorphization which detects when an item does not use generic parameters and is being needlessly monomorphized as a result. Signed-off-by: David Wood <david@davidtw.co>
2020-07-20debuginfo: add type metadata for paramsDavid Wood-0/+16
This commit adds type metadata for generic parameters (that arise from polymorphization). Generic parameter metadata is considered zero-sized and named after the generic parameter. Signed-off-by: David Wood <david@davidtw.co>
2020-07-20debuginfo: no type metadata if substs reqdDavid Wood-2/+4
This commit skips generating debuginfo type metadata if substitutions are required by the type. This avoids ICEs that result from layouts of types with substitutions being computed. Signed-off-by: David Wood <david@davidtw.co>
2020-07-15Change `SymbolName::name` to a `&str`.Nicholas Nethercote-4/+3
This eliminates a bunch of `Symbol::intern()` and `Symbol::as_str()` calls, which is good, because they require locking the interner. Note that the unsafety in `from_cycle_error()` is identical to the unsafety on other adjacent impls.
2020-07-11Rollup merge of #73715 - MaulingMonkey:pr-natvis-tuples, r=AmanieuManish Goregaokar-1/+71
debuginfo: Mangle tuples to be natvis friendly, typedef basic types These changes are meant to unblock rust-lang/rust#70052 "Update hashbrown to 0.8.0" by allowing the use of `tuple<u64, u64>` as a .natvis expression in MSVC style debuggers (MSVC, WinDbg, CDB, etc.) * f8eb81b does the actual mangling of `(u64, u64)` -> `tuple<u64, 64>` * 24a728a allows `u64` to resolve (fixing `$T1` / `$T2` when used to visualize `HashMap<u64, u64, ...>`)
2020-06-26Rollup merge of #72620 - tmiasko:linkage-name, r=eddybManish Goregaokar-12/+6
Omit DW_AT_linkage_name when it is the same as DW_AT_name The DWARF standard suggests that it might be useful to include `DW_AT_linkage_name` when it is *distinct* from the identifier name. Fixes #46487. Fixes #59422.
2020-06-24debuginfo: Define int/float types in terms of MSVC-recognized types.MaulingMonkey-1/+71
PDB debug information doesn't appear to be emitted for basic types. By defining u32 as a typedef for unsigned __int32 when targeting MSVC, we allow CDB and other debuggers to recognize "u32" as a type/expression. This in turn unblocks rust-lang#70052 "Update hashbrown to 0.8.0" by allowing $T1 ..= $T3 to resolve, which would otherwise fail to resolve when builtin types fail to parse.
2020-06-24Add generator-debug test for MSVCTyler Mandry-8/+10
..which doesn't use variant types.
2020-06-24Allow calling GeneratorSubsts::variant_name() without substsTyler Mandry-8/+6
2020-06-24Add Artificial flag to generator variantsTyler Mandry-14/+53
2020-06-24Emit line info for generator variantsTyler Mandry-10/+56
2020-06-19Rollup merge of #72497 - RalfJung:tag-term, r=oli-obkRalf Jung-55/+53
tag/niche terminology cleanup The term "discriminant" was used in two ways throughout the compiler: * every enum variant has a corresponding discriminant, that can be given explicitly with `Variant = N`. * that discriminant is then encoded in memory to store which variant is active -- but this encoded form of the discriminant was also often called "discriminant", even though it is conceptually quite different (e.g., it can be smaller in size, or even use niche-filling). After discussion with @eddyb, this renames the second term to "tag". The way the tag is encoded can be either `TagEncoding::Direct` (formerly `DiscriminantKind::Tag`) or `TagEncoding::Niche` (formerly `DiscrimianntKind::Niche`). This finally resolves some long-standing confusion I had about the handling of variant indices and discriminants, which surfaced in https://github.com/rust-lang/rust/pull/72419. (There is also a `DiscriminantKind` type in libcore, it remains unaffected. I think this corresponds to the discriminant, not the tag, so that seems all right.) r? @eddyb
2020-06-15add FIXME to EnumTagInfoRalf Jung-0/+3
2020-05-30tag/niche terminology cleanupRalf Jung-55/+50
2020-05-27Add -Z profile-emit=<path> for Gcov gcda output.Ivan Lozano-4/+4
Adds a -Z flag to control the file path that the Gcov gcda output is written to during runtime. This flag expects a path and filename, e.g. -Z profile-emit=gcov/out/lib.gcda. This works similar to GCC/Clang's -fprofile-dir flag which allows control over the output path for gcda coverage files.
2020-05-27Omit DW_AT_linkage_name when it is the same as DW_AT_nameTomasz Miąsko-12/+6
The DWARF standard suggests that it might be useful to include `DW_AT_linkage_name` when it is *distinct* from the identifier name.
2020-05-21rustllvm: Fix warnings about unused function parametersVadim Petrochenkov-17/+4
2020-05-08Remove ast::{Ident, Name} reexports.Camille GILLOT-6/+4
2020-04-27Change return type of `entry_fn` query to return a `LocalDefId`marmeladema-1/+1
2020-04-14Update the minimum external LLVM to 8Josh Stone-15/+3
LLVM 8 was released on March 20, 2019, over a year ago.
2020-04-05Fix performance regression in debuginfo file_metadata.Arlo Siemsen-11/+10
Finding the `SourceFile` associated with a `FileName` called `get_source_file` on the `SourceMap`, which does a linear search through all files in the `SourceMap`. This resolves the issue by passing the SourceFile in from the caller (which already had it available).
2020-04-02Add hash of source files in debug infoArlo Siemsen-3/+31
* Adds either an MD5 or SHA1 hash to the debug info. * Adds new unstable option `-Z src-hash-algorithm` to control the hashing algorithm.
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-53/+43
2020-03-30Use if let instead of match when only matching a single variant ↵Matthias Krüger-10/+8
(clippy::single_match) Makes code more compact and reduces nestig.
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-6/+6
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-19/+19
2020-03-27Rename TyLayout to TyAndLayout.Ana-Maria Mihalache-5/+5
2020-03-24normalize some imports, prefer direct ones.Mazdak Farrokhzad-1/+1
2020-03-23Rollup merge of #69968 - eddyb:tupled-closure-captures, r=nikomatsakisMazdak Farrokhzad-2/+2
rustc: keep upvars tupled in {Closure,Generator}Substs. Previously, each closure/generator capture's (aka "upvar") type was tracked as one "synthetic" type parameter in the closure/generator substs, and figuring out where the parent `fn`'s generics end and the synthetics start involved slicing at `tcx.generics_of(def_id).parent_count`. Needing to query `generics_of` limited @davidtwco (who wants to compute some `TypeFlags` differently for parent generics vs upvars, and `TyCtxt` is not available there), which is how I got started on this, but it's also possible that the `generics_of` queries are slowing down `{Closure,Generator}Substs` methods. To give an example, for a `foo::<T, U>::{closure#0}` with captures `x: X` and `y: Y`, substs are: * before this PR: `[T, U, /*kind*/, /*signature*/, X, Y]` * after this PR: `[T, U, /*kind*/, /*signature*/, (X, Y)]` You can see that, with this PR, no matter how many captures, the last 3 entries in the substs (or 5 for a generator) are always the "synthetic" ones, with the last one being the tuple of capture types. r? @nikomatsakis cc @Zoxc
2020-03-23Rollup merge of #69940 - tmiasko:llvm-api, r=hanna-kruppeMazdak Farrokhzad-1/+1
librustc_codegen_llvm: Replace deprecated API usage
2020-03-23rustc_codegen_llvm: don't generate static and vtable debuginfo for ↵Eduard-Mihai Burtescu-0/+10
-Cdebuginfo=1.
2020-03-23rustc_codegen_llvm: don't generate Self type debuginfo for methods for ↵Eduard-Mihai Burtescu-1/+6
-Cdebuginfo=1.
2020-03-23rustc_codegen_llvm: don't generate "lexical block" scopes for -Cdebuginfo=1.Eduard-Mihai Burtescu-4/+13
2020-03-21rustc: keep upvars tupled in {Closure,Generator}Substs.Eduard-Mihai Burtescu-2/+2
2020-03-20remove redundant returns (clippy::needless_return)Matthias Krüger-15/+13
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-3/+3
2020-03-15Rollup merge of #69357 - tmiasko:debuginfo-column, r=michaelwoeristerDylan DPC-43/+57
Emit 1-based column numbers in debuginfo * Use byte offsets instead of char position offsets. Resolves #67360. * Use 1-based offsets instead of 0-based ones. Resolves #65437. * Consistently omit column information for msvc targets, matching clang behaviour (previously columns have been omitted from `DILocation`, but not from `DILexicalBlock`).
2020-03-11librustc_codegen_llvm: Replace deprecated API usageTomasz Miąsko-1/+1
2020-03-09Avoid unnecessary interning of enum variant part idTomasz Miąsko-4/+1
2020-03-09Use slices in preference to 0-terminated stringsTomasz Miąsko-126/+155
Additionally whenever possible match C API provided by the LLVM.
2020-03-08Rollup merge of #69734 - tmiasko:di-enumerator, r=ecstatic-morseMazdak Farrokhzad-7/+16
Change DIBuilderCreateEnumerator signature to match LLVM 9 * Change DIBuilderCreateEnumerator signature to match LLVM 9 C API. * Use provided is unsigned flag when emitting enumerators.
2020-03-07Rollup merge of #69773 - matthiaskrgr:typos, r=petrochenkovMazdak Farrokhzad-1/+1
fix various typos
2020-03-06fix various typosMatthias Krüger-1/+1