about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo/mod.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-563/+0
2020-08-06Incorporate tracing cratebishtpawan-1/+1
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-1/+1
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-05-27Omit DW_AT_linkage_name when it is the same as DW_AT_nameTomasz Miąsko-3/+3
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-7/+2
2020-05-08Remove ast::{Ident, Name} reexports.Camille GILLOT-2/+1
2020-04-27Change return type of `entry_fn` query to return a `LocalDefId`marmeladema-1/+1
2020-04-05Fix performance regression in debuginfo file_metadata.Arlo Siemsen-2/+2
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-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-14/+14
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-4/+4
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-4/+4
2020-03-23rustc_codegen_llvm: don't generate Self type debuginfo for methods for ↵Eduard-Mihai Burtescu-1/+6
-Cdebuginfo=1.
2020-03-20remove redundant returns (clippy::needless_return)Matthias Krüger-1/+1
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-7/+7
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-09Use slices in preference to 0-terminated stringsTomasz Miąsko-11/+11
Additionally whenever possible match C API provided by the LLVM.
2020-03-03Remove the `no_debug` featureYuki Okushi-8/+1
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-1/+1
2020-02-26Use byte offsets when emitting debuginfo columnsTomasz Miąsko-7/+7
2020-02-09Rollup merge of #68881 - eddyb:always-preserve-dbg-vars, r=nagisaJonas Schievink-1/+1
rustc_codegen_llvm: always set AlwaysPreserve on all debuginfo variables Making this depend on the optimization level appears to have been a copy-paste mistake (other LLVM functions called in this module also take a `bool` argument, but there it means something unrelated). Also see https://github.com/rust-lang/rust/pull/8855#discussion_r374392128. I don't believe we have any reason to let LLVM omit user variables from DWARF, and we were already setting this to `true` when LLVM *could* optimize them away, so this PR should have no effect anyway. r? @michaelwoerister or @nagisa cc @hanna-kruppe @nikomatsakis
2020-02-08rustc_codegen_ssa: remove unnecessary source_locations_enabled.Eduard-Mihai Burtescu-9/+8
2020-02-08rustc_codegen_llvm: remove InternalDebugLocation and simplify dbg_var_addr.Eduard-Mihai Burtescu-17/+8
2020-02-06rustc_codegen_llvm: always set AlwaysPreserve on all debuginfo variables.Eduard-Mihai Burtescu-1/+1
2020-02-03rustc_codegen_llvm: avoid redundant calls to span_start.Eduard-Mihai Burtescu-4/+4
2020-02-03rustc_codegen_ssa: split declare_local into create_dbg_var and dbg_var_addr.Eduard-Mihai Burtescu-33/+51
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-1/+1
2020-01-04DefId{Map,Set} -> rustc::hir::def_idMazdak Farrokhzad-2/+1
2020-01-04canonicalize FxHash{Map,Set} importsMazdak Farrokhzad-1/+2
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-7/+7
2019-12-22Format the worldMark Rousskov-101/+99
2019-12-11rustc: Link LLVM directly into rustc againAlex Crichton-0/+1
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-12-04Migrate to LLVM{Get,Set}ValueName2Josh Stone-18/+6
The deprecated `LLVM{Get,Set}ValueName` only work with NUL-terminated strings, but the `2` variants use explicit lengths, which fits better with Rust strings and slices. We now use these in new helper functions `llvm::{get,set}_value_name` that convert to/from `&[u8]`.
2019-12-03rustc_codegen_llvm: rewrite debuginfo::get_function_signature to use FnAbi.Eduard-Mihai Burtescu-33/+12
2019-12-03rustc_codegen_ssa: use FnAbi::of_instance wherever possible.Eduard-Mihai Burtescu-3/+10
2019-10-31rustc_codegen_ssa: hide address ops from the declare_local interface.Eduard-Mihai Burtescu-48/+53
2019-10-31rustc_codegen_ssa: move debuginfo scopes into FunctionDebugContext.Eduard-Mihai Burtescu-25/+26
2019-10-31rustc_codegen_ssa: change set_var_name back to taking a &str.Eduard-Mihai Burtescu-2/+2
2019-10-31rustc_codegen_ssa: move debuginfo-related things to a new mir::debuginfo module.Eduard-Mihai Burtescu-5/+6
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-05Replaces some instances of `as *[const | mut] _` with `.cast()`memoryruins-3/+3
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-1/+1
2019-09-26Rename `subst::Kind` to `subst::GenericArg`varkor-2/+2
2019-09-25Rename `sty` to `kind`varkor-4/+4
2019-09-06rustc_codegen_llvm: give names to non-alloca variable values.Eduard-Mihai Burtescu-3/+32
2019-09-04Remove `LocalInternedString` uses from `librustc/ty/`.Nicholas Nethercote-1/+1
This is not a compelling change in isolation, but it is a necessary step.
2019-06-02remove reexport of rustc::ty::InstanceMark Mansi-2/+1
2019-05-28Changes the type `mir::Mir` into `mir::Body`Claude-Alban RANÉLY-VERGÉ-DÉPRÉ-2/+2
The commit should have changed comments as well. At the time of writting, it passes the tidy and check tool. Revisions asked by eddyb : - Renamed of all the occurences of {visit/super}_mir - Renamed test structures `CachedMir` to `Cached` Fixing the missing import on `AggregateKind`