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
Denis Merigoux
8714e6bce6
Traitification of common.rs methods
2018-11-16 14:11:59 +02:00
Denis Merigoux
d577ec7e5f
New files and folders for traits
...
Moved common enums to common
2018-11-16 14:11:59 +02:00
Denis Merigoux
9c41e1aa10
Removed genericity over Value in various functions
...
Prelude to using associated types in traits rather than type parameters
2018-11-16 14:11:34 +02:00
Denis Merigoux
34c5dc045f
Generalized base.rs#call_memcpy and everything that it uses
...
Generalized operand.rs#nontemporal_store and fixed tidy issues
Generalized operand.rs#nontemporal_store's implem even more
With a BuilderMethod trait implemented by Builder for LLVM
Cleaned builder.rs : no more code duplication, no more ValueTrait
Full traitification of builder.rs
2018-11-16 14:11:09 +02:00
Oliver Scherer
4a9ed3f25a
Use type safe VariantIdx instead of usize everywhere
2018-11-12 14:24:45 +01:00
bors
d1d79ae3ad
Auto merge of #55701 - tromey:ice-fix, r=matthewjasper
...
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-12 04:12:26 +00:00