summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo/metadata.rs
AgeCommit message (Collapse)AuthorLines
2019-02-25librustc_codegen_llvm: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-5/+5
2019-02-18librustc_codegen_llvm => 2018Taiki Endo-6/+6
2019-01-25Set the DICompileUnit emissionKindJosh Stone-2/+4
2019-01-22Simplify the version checkTom Tromey-4/+3
Address the review comments by simplifying the version check to just "< 8".
2019-01-22Fix issue 57762Tom Tromey-1/+5
Issue 57762 points out a compiler crash when the compiler was built using a stock LLVM 7. LLVM 7 was released without a necessary fix for a bug in the DWARF discriminant code. This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7. Closes #57762
2019-01-12Use `ptr::eq` where applicableIgor Matuszewski-1/+1
2019-01-04add support for principal-less trait object typesAriel Ben-Yehuda-1/+2
should be a pure refactoring.
2018-12-26Store `Ident` rather than just `Name` in HIR types `Item` and `ForeignItem`.Alexander Regueiro-6/+6
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-03Auto merge of #55010 - tromey:Bug-9224-generic-parameters, r=michaelwoeristerbors-5/+61
Add template parameter debuginfo to generic types This changes debuginfo generation to add template parameters to generic types. With this change the DWARF now has DW_TAG_template_type_param for types, not just for functions, like: <2><40d>: Abbrev Number: 6 (DW_TAG_structure_type) <40e> DW_AT_name : (indirect string, offset: 0x375): Generic<i32> <412> DW_AT_byte_size : 4 <413> DW_AT_alignment : 4 ... <3><41f>: Abbrev Number: 8 (DW_TAG_template_type_param) <420> DW_AT_type : <0x42a> <424> DW_AT_name : (indirect string, offset: 0xa65e): T Closes #9224
2018-11-29Add template parameter debuginfo to generic typesTom Tromey-5/+61
This changes debuginfo generation to add template parameters to generic types. With this change the DWARF now has DW_TAG_template_type_param for types, not just for functions, like: <2><40d>: Abbrev Number: 6 (DW_TAG_structure_type) <40e> DW_AT_name : (indirect string, offset: 0x375): Generic<i32> <412> DW_AT_byte_size : 4 <413> DW_AT_alignment : 4 ... <3><41f>: Abbrev Number: 8 (DW_TAG_template_type_param) <420> DW_AT_type : <0x42a> <424> DW_AT_name : (indirect string, offset: 0xa65e): T Closes #9224
2018-11-29Rename conversion util; remove duplicate util in librustc_codegen_llvm.Corey Farwell-2/+2
2018-11-22rustc_target: avoid using AbiAndPrefAlign where possible.Eduard-Mihai Burtescu-18/+18
2018-11-22rustc_target: separate out an individual Align from AbiAndPrefAlign.Eduard-Mihai Burtescu-14/+14
2018-11-22rustc_target: rename abi::Align to AbiAndPrefAlign.Eduard-Mihai Burtescu-16/+12
2018-11-16[eddyb] rustc_codegen_ssa: rename `interfaces` to `traits`.Eduard-Mihai Burtescu-1/+1
2018-11-16Finished moving backend-agnostic code to rustc_codegen_ssaDenis Merigoux-2/+1
2018-11-16Adapt code to latest rustc master changesDenis Merigoux-7/+1
2018-11-16Generalized mir::codegen_mir (and all subsequent functions)Denis Merigoux-58/+62
2018-11-16Generalized base::unsized_infoDenis Merigoux-51/+54
2018-11-16Removing LLVM content from CommonMethods -> ConstMethodsDenis Merigoux-1/+1
2018-11-16Prefixed const methods with "const" instead of "c"Denis Merigoux-1/+1
2018-11-16Traitification of common.rs methodsDenis Merigoux-2/+3
2018-11-12Use type safe `VariantIdx` instead of `usize` everywhereOliver Scherer-5/+5
2018-11-12Auto merge of #55701 - tromey:ice-fix, r=matthewjasperbors-4/+4
Fix emission of niche-filling discriminant values Bug #55606 points out a regression introduced by #54004; namely that an assertion can erroneously fire when a niche-filling discriminant value is emitted. This fixes the bug by removing the assertion, and furthermore by arranging for the discriminant value to be masked according to the size of the niche. This makes handling the discriminant a bit simpler for debuggers. The test case is from Jonathan Turner. Closes #55606
2018-11-05Fix emission of niche-filling discriminant valuesTom Tromey-4/+4
Bug #55606 points out a regression introduced by #54004; namely that an assertion can erroneously fire when a niche-filling discriminant value is emitted. This fixes the bug by removing the assertion, and furthermore by arranging for the discriminant value to be masked according to the size of the niche. This makes handling the discriminant a bit simpler for debuggers. The test case is from Jonathan Turner. Closes #55606
2018-11-03Implement rotate using funnel shift on LLVM >= 7Nikita Popov-3/+3
Implement the rotate_left and rotate_right operations using llvm.fshl and llvm.fshr if they are available (LLVM >= 7). Originally I wanted to expose the funnel_shift_left and funnel_shift_right intrinsics and implement rotate_left and rotate_right on top of them. However, emulation of funnel shifts requires emitting a conditional to check for zero shift amount, which is not necessary for rotates. I was uncomfortable doing that here, as I don't want to rely on LLVM to optimize away that conditional (and for variable rotates, I'm not sure it can). We should revisit that question when we raise our minimum version requirement to LLVM 7 and don't need emulation code anymore.
2018-10-30Avoid possible integer overflow in niche value computationTom Tromey-2/+5
@eddyb pointed out in review that the niche value computation had a possible integer overflow problem, fixed here as he suggested.
2018-10-30Address review commentsTom Tromey-11/+11
This fixes the issues pointed out in review.
2018-10-30Fix DWARF generation for enumsTom Tromey-144/+379
The DWARF generated for Rust enums was always somewhat unusual. Rather than using DWARF constructs directly, it would emit magic field names like "RUST$ENCODED$ENUM$0$Name" and "RUST$ENUM$DISR". Since PR #45225, though, even this has not worked -- the ad hoc scheme was not updated to handle the wider variety of niche-filling layout optimizations now available. This patch changes the generated DWARF to use the standard tags meant for this purpose; namely, DW_TAG_variant and DW_TAG_variant_part. The patch to implement this went in to LLVM 7. In order to work with older versions of LLVM, and because LLVM doesn't do anything here for PDB, the existing code is kept as a fallback mode. Support for this DWARF is in the Rust lldb and in gdb 8.2. Closes #32920 Closes #32924 Closes #52762 Closes #53153
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-9/+1
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-3/+3
2018-10-18Rollup merge of #54933 - ljedrz:cleanup_codegen_llvm/misc, r=varkorkennytm-47/+46
Cleanup the rest of codegen_llvm - improve common patterns - convert string literals with `to_owned` - remove explicit `return`s - whitespace & formatting improvements
2018-10-16end return statements and void expressions with a semicolonljedrz-5/+5
2018-10-13Check the invariant for `principal` inside the methodOliver Scherer-6/+1
2018-10-09codegen_llvm/misc: convert string literals with to_ownedljedrz-5/+5
2018-10-09codegen_llvm/misc: improve common patternsljedrz-24/+23
2018-10-09codegen_llvm/misc: remove explicit returnsljedrz-3/+3
2018-10-09codegen_llvm/misc: whitespace & formatting improvementsljedrz-15/+15
2018-09-14Remove LLVM 3.9 workaround.Unknown-7/+1
2018-08-23use String::new() instead of String::from(""), "".to_string(), "".to_owned() ↵Matthias Krüger-2/+2
or "".into()
2018-08-22Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str}varkor-12/+12
2018-08-22Remove Ty prefix from Ty{Foreign|Param}varkor-1/+1
2018-08-22Remove Ty prefix from ↵varkor-22/+22
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-22miri/CTFE refactorRalf Jung-0/+1
* Value gets renamed to Operand, so that now interpret::{Place, Operand} are the "dynamic" versions of mir::{Place, Operand}. * Operand and Place share the data for their "stuff is in memory"-base in a new type, MemPlace. This also makes it possible to give some more precise types in other areas. Both Operand and MemPlace have methods available to project into fields (and other kinds of projections) without causing further allocations. * The type for "a Scalar or a ScalarPair" is called Value, and again used to give some more precise types. * All of these have versions with an attached layout, so that we can more often drag the layout along instead of recomputing it. This lets us get rid of `PlaceExtra::Downcast`. MPlaceTy and PlaceTy can only be constructed in place.rs, making sure the layout is handled properly. (The same should eventually be done for ValTy and OpTy.) * All the high-level functions to write typed memory take a Place, and live in place.rs. All the high-level typed functions to read typed memory take an Operand, and live in operands.rs.
2018-08-19mv FileMap SourceFileDonato Sciarra-1/+1
2018-08-10Introduce SmallCStr and use it where applicable.Michael Woerister-38/+36
2018-08-10Introduce const_cstr!() macro and use it where applicable.Michael Woerister-2/+2
2018-08-09Move Fingerprint to data structuresMark Rousskov-1/+2