bjorn3
794ecd965a
[WIP] Make some debug info methods take &mut FunctionDebugContext
...
declare_local still takes &FunctionDebugContext, because of borrowck errors
2019-03-29 17:17:12 +01:00
bjorn3
ab8f1527e4
Remove internal mutability from source_locations_enabled
2019-03-29 17:17:12 +01:00
Mazdak Farrokhzad
f90ac4f04a
Rollup merge of #58717 - hellow554:nonzero_parse, r=oli-obk
...
Add FromStr impl for NonZero types
This is a WIP implementation because I do have some questions regarding the solution.
Somebody should ping the lang team on this I guess.
Please see the annotations on the code for more details.
Closes #58604
2019-03-28 13:35:29 +01:00
Marcel Hellwig
8f3e862797
fixed shift overflow
...
Fix according to oli-obk
(https://github.com/rust-lang/rust/pull/58717#issuecomment-477494457 )
2019-03-28 10:12:17 +01:00
Samuel Holland
8d3dd39d88
Correct minimum system LLVM version in tests
...
Since commit 9452a8dfa3 , the new debug info format is only generated
for LLVM 8 and newer versions. However, the tests still assume that LLVM
7 will use the new debug info format. Fix the tests (and a comment in
the code) to match the actual version check.
2019-03-22 21:28:25 -05:00
Nikita Baksalyar
d1034c19a2
Fix incorrect links in librustc_codegen_llvm documentation
2019-03-11 01:11:54 +00:00
Dan Robertson
08bd4ff998
Rename variadic to c_variadic
...
Function signatures with the `variadic` member set are actually
C-variadic functions. Make this a little more explicit by renaming the
`variadic` boolean value, `c_variadic`.
2019-02-27 10:21:54 -05:00
csmoe
cf11729787
rename Substs to InternalSubsts
...
Change-Id: I3fa00e999a2ee4eb72db1fdf53a8633b49176a18
2019-02-27 00:39:13 +08:00
Mazdak Farrokhzad
9661a81968
librustc_codegen_llvm: deny(elided_lifetimes_in_paths)
2019-02-25 08:40:18 +01:00
Taiki Endo
1b7ca961d9
librustc_codegen_llvm => 2018
2019-02-18 03:58:58 +09:00
Alexander Regueiro
c3e182cf43
rustc: doc comments
2019-02-10 23:42:32 +00:00
Josh Stone
cff0750090
Set the DICompileUnit emissionKind
2019-01-25 15:39:54 -08:00
Josh Stone
df0466d0bb
Rebase to the llvm-project monorepo
...
The new git submodule src/llvm-project is a monorepo replacing src/llvm
and src/tools/{clang,lld,lldb}. This also serves as a rebase for these
projects to the new 8.x branch from trunk.
The src/llvm-emscripten fork is unchanged for now.
2019-01-25 15:39:54 -08:00
Tom Tromey
9452a8dfa3
Simplify the version check
...
Address the review comments by simplifying the version check to
just "< 8".
2019-01-22 11:45:25 -07:00
Tom Tromey
1c95f5a34c
Fix issue 57762
...
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-22 11:18:01 -07:00
Igor Matuszewski
ff19a53ef0
Querify entry_fn
2019-01-15 11:10:51 +01:00
Igor Matuszewski
7948b18414
Use ptr::eq where applicable
2019-01-12 16:18:55 +01:00
Ariel Ben-Yehuda
3aa1503a61
add support for principal-less trait object types
...
should be a pure refactoring.
2019-01-04 00:34:52 +02:00
Alexander Regueiro
1b150c4043
Store Ident rather than just Name in HIR types Item and ForeignItem.
2018-12-26 21:26:37 +00:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07:00
Alexander Regueiro
ee89c088b0
Various minor/cosmetic improvements to code
2018-12-07 23:53:34 +00:00
John Kåre Alsaker
a70babed03
Use a function to access the Hir map to be able to turn it into a query later
2018-12-06 17:24:36 +01:00
bors
9cd3bef4cf
Auto merge of #55010 - tromey:Bug-9224-generic-parameters, r=michaelwoerister
...
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-12-03 11:59:11 +00:00
bors
21f2684950
Auto merge of #56198 - bjorn3:cg_ssa_refactor, r=eddyb
...
Refactor rustc_codegen_ssa
cc #56108 (not all things are done yet)
This removes an unsafe method from cg_ssa.
r? @eddyb
cc @sunfishcode
2018-12-02 18:02:20 +00:00
Tom Tromey
fb204cb92f
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-29 13:04:09 -07:00
bjorn3
ceb29e2ac4
Use implicit deref instead of BuilderMethods::cx()
2018-11-29 18:19:44 +01:00
Corey Farwell
2a91bbac5d
Rename conversion util; remove duplicate util in librustc_codegen_llvm.
2018-11-29 08:09:28 -05:00
scalexm
05995a8522
Introduce TyKind::Placeholder variant
2018-11-24 01:24:40 +01:00
bors
6a2d1b4e15
Auto merge of #54071 - eddyb:alignsssss, r=oli-obk
...
rustc_target: separate out an individual alignment quantity type from Align.
Before this PR, `rustc_target::abi::Align` combined "power-of-two alignment quantity" semantics, with a distinction between ABI (required) and preferred alignment (by having two quantities).
After this PR, `Align` is only *one* such quantity, and a new `AbiAndPrefAlign` type is introduced to hold the pair of ABI and preferred `Align` quantities.
`Align` is used everywhere one quantity is necessary/sufficient, simplifying some of the code in codegen/miri, while `AbiAndPrefAlign` only in layout computation (to propagate preferred alignment).
r? @oli-obk cc @nagisa @RalfJung @nikomatsakis
2018-11-23 01:02:21 +00:00
Eduard-Mihai Burtescu
5b4747ded7
rustc_target: avoid using AbiAndPrefAlign where possible.
2018-11-22 05:01:49 +02:00
Eduard-Mihai Burtescu
3ce8d444af
rustc_target: separate out an individual Align from AbiAndPrefAlign.
2018-11-22 04:38:00 +02:00
Eduard-Mihai Burtescu
d56e892085
rustc_target: rename abi::Align to AbiAndPrefAlign.
2018-11-22 04:12:59 +02:00
Eduard-Mihai Burtescu
da622a3796
rustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns.
2018-11-21 07:27:02 +02:00
Eduard-Mihai Burtescu
0b569249c8
[eddyb] rustc_codegen_ssa: rename interfaces to traits.
2018-11-16 15:08:18 +02:00
Denis Merigoux
54dd3a47fd
All Builder methods now take &mut self instead of &self
2018-11-16 15:08:18 +02:00
Denis Merigoux
015e4441f5
Finished moving backend-agnostic code to rustc_codegen_ssa
2018-11-16 15:08:18 +02:00
Denis Merigoux
c0a428ee70
Great separation of librustc_codegen_llvm: librustc_codegen_ssa compiles
2018-11-16 15:07:24 +02:00
Denis Merigoux
6819e6e6e1
Preparing the generalization of base:compile_coodegen_unit
2018-11-16 14:38:15 +02:00
Denis Merigoux
97825a36be
Move doc to trait declarations
2018-11-16 14:36:38 +02:00
Denis Merigoux
ac34068ed9
Generalized base:maybe_create_entry_wrapper
2018-11-16 14:34:26 +02:00
Denis Merigoux
b14f3e5490
Adapt code to latest rustc master changes
2018-11-16 14:34:26 +02:00
Denis Merigoux
6a993fe353
Generalized mir::codegen_mir (and all subsequent functions)
2018-11-16 14:33:10 +02:00
Denis Merigoux
034f69753b
Generalized base::unsized_info
2018-11-16 14:15:13 +02:00
Denis Merigoux
d77e34f35b
Generalized memset and memcpy
2018-11-16 14:11:59 +02:00
Denis Merigoux
a1d0d4f943
Removing LLVM content from CommonMethods -> ConstMethods
2018-11-16 14:11:59 +02:00
Denis Merigoux
e224f063e8
Prefixed type methods & removed trait impl for write::CodegenContext
2018-11-16 14:11:59 +02:00
Denis Merigoux
6d42574b7a
Prefixed const methods with "const" instead of "c"
2018-11-16 14:11:59 +02:00
Denis Merigoux
730b13ab51
Traitification of type_ methods
...
The methods are now attached to CodegenCx instead of Type
2018-11-16 14:11:59 +02:00
Denis Merigoux
3e77f2fc4f
Use the method form for CodegenCx everywhere
2018-11-16 14:11:59 +02:00
Denis Merigoux
d325844804
Replaced Codegen field access by trait method
2018-11-16 14:11:59 +02:00