Alex Crichton
d5985bc9ec
rustc: Start implementing compat with LLVM 9
...
This commit doesn't actually migrate to LLVM 9, but it brings our own
C++ bindings in line with LLVM 9 and able to compile against tip of
tree. The changes made were:
* The `MainSubprogram` flag for debuginfo moved between flag types.
* Iteration of archive members was tweaked slightly and we have to
construct the two iterators before constructing the returned
`RustArchiveIterator` value.
* The `getOrInsertFunction` binding now returns a wrapper which we use
`getCallee()` on to get the value we're interested in.
2019-04-05 08:10:18 -07:00
bjorn3
7de0b1de19
Move get_param and set_value_name
2019-03-29 17:17:13 +01:00
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
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
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
Igor Matuszewski
ff19a53ef0
Querify entry_fn
2019-01-15 11:10:51 +01: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
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
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
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
d325844804
Replaced Codegen field access by trait method
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
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
3c9258e604
Prefer Default::default
over FxHash*::default
in struct constructors
2018-10-19 14:34:44 +02:00
Oliver Scherer
ee81739dc1
Deprecate the FxHashMap()
and FxHashSet()
constructor function hack
2018-10-19 14:34:44 +02:00
ljedrz
b07a2d02ca
codegen_llvm/misc: improve common patterns
2018-10-09 15:15:41 +02:00
ljedrz
e90e8aaeba
codegen_llvm/misc: remove explicit returns
2018-10-09 15:14:38 +02:00
Jorge Aparicio
bd3c7812cb
use is_uninhabited in more places
2018-09-30 17:27:06 +02:00
Ralf Jung
e37d6d37e7
Revert "Auto merge of #53508 - japaric:maybe-uninit, r=RalfJung"
...
This reverts commit c6e3d7fa31
, reversing
changes made to 4591a245c7
.
2018-09-29 09:50:50 +02:00
Jorge Aparicio
ce6e6f9333
use is_uninhabited in more places
2018-09-22 21:01:21 +02:00
varkor
6f637da50c
Remove Ty prefix from Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-22 16:07:44 +01:00
Michael Woerister
88d84b38f1
Introduce SmallCStr and use it where applicable.
2018-08-10 11:13:00 +02:00
Mark Rousskov
2bc71971e5
Normalize DebugInfoLevel to standard style
2018-08-04 06:54:34 -06:00
Irina Popa
69ed6b928c
rustc_codegen_llvm: fix ownership of DIBuilder.
2018-07-30 20:35:14 +03:00
Irina Popa
f375185314
rustc_codegen_llvm: use safe references for Value.
2018-07-30 19:49:18 +03:00
Irina Popa
eed48f560f
rustc_codegen_llvm: use safe references for Metadata and DI*.
2018-07-30 19:27:13 +03:00
Irina Popa
6d0d82ce10
rustc_codegen_llvm: use safe references for DIBuilder.
2018-07-30 18:36:32 +03:00
Irina Popa
d04e66d114
rustc_codegen_llvm: use safe references for Type.
2018-07-30 18:36:29 +03:00
Irina Popa
249d5acaec
rustc_codegen_llvm: use safe references for Context and Module.
2018-07-30 18:27:52 +03:00
Irina Popa
af04e9426c
rustc_codegen_llvm: move from empty enums to extern types.
2018-07-30 18:12:47 +03:00
ljedrz
59c8a279da
Replace push loops with collect() and extend() where possible
2018-07-29 18:53:22 +02:00
Vadim Petrochenkov
9f92fce77c
Fortify dummy span checking
2018-06-30 01:53:32 +03:00
Eduard-Mihai Burtescu
a8ceab9cd7
rustc_codegen_llvm: remove debuginfo::VariableKind::CapturedVariable.
2018-05-21 20:39:59 +03:00
Irina Popa
b63d7e2b1c
Rename trans to codegen everywhere.
2018-05-17 15:08:30 +03:00