about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo/metadata.rs
AgeCommit message (Collapse)AuthorLines
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-8/+7
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-39/+29
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 2Mazdak Farrokhzad-11/+11
2020-03-27Rename TyLayout to TyAndLayout.Ana-Maria Mihalache-5/+5
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-23rustc_codegen_llvm: don't generate static and vtable debuginfo for ↵Eduard-Mihai Burtescu-0/+10
-Cdebuginfo=1.
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-11/+11
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-1/+1
2020-03-15Rollup merge of #69357 - tmiasko:debuginfo-column, r=michaelwoeristerDylan DPC-5/+5
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-09Avoid unnecessary interning of enum variant part idTomasz Miąsko-4/+1
2020-03-09Use slices in preference to 0-terminated stringsTomasz Miąsko-107/+140
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
2020-03-05debuginfo: Use is unsigned flag when emitting enumeratorsTomasz Miąsko-1/+6
2020-03-05debuginfo: Generators use u32 as discriminant type reprTomasz Miąsko-3/+3
2020-03-05Change DIBuilderCreateEnumerator signature to match LLVM 9Tomasz Miąsko-6/+10
No functional changes intended.
2020-03-03Remove the `no_debug` featureYuki Okushi-4/+0
2020-03-01Rollup merge of #69569 - matthiaskrgr:nonminimal_bool, r=mark-SimulacrumDylan DPC-1/+1
simplify boolean expressions
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-1/+1
2020-02-29simplify boolean expressionsMatthias Krüger-1/+1
2020-02-26Use byte offsets when emitting debuginfo columnsTomasz Miąsko-5/+5
2020-01-10Remove PlaceBase enum and make Place base field be local: LocalSantiago Pastorino-2/+2
2020-01-06Auto merge of #67886 - Centril:rustc_hir_canon_imports, r=nagisabors-2/+2
Nix `rustc_hir` reexports in rustc::hir r? @Zoxc cc @Mark-Simulacrum
2020-01-05Rename Instance.ty to Instance.monomorphic_tyAaron Hill-1/+1
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-2/+2
2020-01-04canonicalize FxHash{Map,Set} importsMazdak Farrokhzad-1/+1
2020-01-04extract rustc::middle::codegen_fn_attrsMazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-8/+8
2019-12-24x.py fmt after previous deignoreMark Rousskov-733/+713
2019-12-11rustc: Link LLVM directly into rustc againAlex Crichton-0/+3
This commit builds on #65501 continue to simplify the build system and compiler now that we no longer have multiple LLVM backends to ship by default. Here this switches the compiler back to what it once was long long ago, which is linking LLVM directly to the compiler rather than dynamically loading it at runtime. The `codegen-backends` directory of the sysroot no longer exists and all relevant support in the build system is removed. Note that `rustc` still supports a dynamically loaded codegen backend as it did previously, it just no longer supports dynamically loaded codegen backends in its own sysroot. Additionally as part of this the `librustc_codegen_llvm` crate now once again explicitly depends on all of its crates instead of implicitly loading them through the sysroot. This involved filling out its `Cargo.toml` and deleting all the now-unnecessary `extern crate` annotations in the header of the crate. (this in turn required adding a number of imports for names of macros too). The end results of this change are: * Rustbuild's build process for the compiler as all the "oh don't forget the codegen backend" checks can be easily removed. * Building `rustc_codegen_llvm` is much simpler since it's simply another compiler crate. * Managing the dependencies of `rustc_codegen_llvm` is much simpler since it's "just another `Cargo.toml` to edit" * The build process should be a smidge faster because there's more parallelism in the main rustc build step rather than splitting `librustc_codegen_llvm` out to its own step. * The compiler is expected to be slightly faster by default because the codegen backend does not need to be dynamically loaded. * Disabling LLVM as part of rustbuild is still supported, supporting multiple codegen backends is still supported, and dynamic loading of a codegen backend is still supported.
2019-11-27rustc: move debug info from LocalDecl and UpvarDecl into a dedicated ↵Eduard-Mihai Burtescu-20/+80
VarDebugInfo.
2019-11-21Applied suggestions from code review.Alexander Regueiro-15/+15
2019-11-21Aggregation of drive-by cosmetic changes.Alexander Regueiro-126/+123
2019-11-07rustc_target: inline abi::FloatTy into abi::Primitive.Eduard-Mihai Burtescu-2/+2
2019-11-07syntax: use distinct FloatTy from rustc_target.Mazdak Farrokhzad-3/+3
We also sever syntax's dependency on rustc_target as a result. This should slightly improve pipe-lining. Moreover, some cleanup is done in related code.
2019-10-23Rollup merge of #65657 - nnethercote:rm-InternedString-properly, r=eddybMazdak Farrokhzad-2/+2
Remove `InternedString` This PR removes `InternedString` by converting all occurrences to `Symbol`. There are a handful of places that need to use the symbol chars instead of the symbol index, e.g. for stable sorting; local conversions `LocalInternedString` is used in those places. r? @eddyb
2019-10-21Convert some `InternedString`s to `Symbols`.Nicholas Nethercote-2/+2
This avoids the needs for various conversions, and makes the code slightly faster, because `Symbol` comparisons and hashing is faster.
2019-10-16Make use of the return value of `HashSet::insert`Shotaro Yamada-3/+1
2019-10-05Rollup merge of #65124 - memoryruins:castaway, r=petrochenkovTyler Mandry-3/+3
Replace some instances of `as *[const | mut] _` with `.cast()` While in `codegen_llvm`, noticed some places for the recent `pointer::cast` method.
2019-10-05Replaces some instances of `as *[const | mut] _` with `.cast()`memoryruins-3/+3
2019-10-04clean up GeneratorSubstscsmoe-8/+10
2019-10-03generate ClosureSubsts from SubstsRefcsmoe-2/+2
2019-09-28Switch over all StableHash impls to new formatMark Rousskov-2/+2
2019-09-26Rename `subst::Kind` to `subst::GenericArg`varkor-2/+2