about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
AgeCommit message (Collapse)AuthorLines
2019-03-29Remove inline_asm_call from cg_ssabjorn3-43/+47
`count_insn` is no longer called for inline asm, because it is private to builder.rs
2019-03-29Remove type_variadic_func and typ_array from cg_ssabjorn3-39/+68
2019-03-29Remove a lot of methods from *TypeMethodsbjorn3-36/+84
2019-03-29Remove scalar_lltypes from cg_ssabjorn3-6/+0
2019-03-29Move get_param and set_value_namebjorn3-26/+34
2019-03-29Remove a lot of methods from BuilderMethodsbjorn3-213/+213
2019-03-29[WIP] Make some debug info methods take &mut FunctionDebugContextbjorn3-2/+2
declare_local still takes &FunctionDebugContext, because of borrowck errors
2019-03-29Remove internal mutability from source_locations_enabledbjorn3-4/+4
2019-03-29Remove const_{cstr,str_slice,get_elt,get_real} and is_const_real methods ↵bjorn3-66/+97
from cg_ssa This introduces the static_panic_msg trait method to StaticBuilderMethods.
2019-03-29Remove const_{fat_ptr,array,vector,bytes} from cg_ssabjorn3-26/+28
2019-03-29Miscbjorn3-1/+1
2019-03-29Add a commentbjorn3-0/+1
2019-03-29Use Builder instead of CodegenCx for OperandRef and LocalRefbjorn3-1/+1
2019-03-29Don't use c_uint in cg_ssabjorn3-2/+2
2019-03-29rustc_target: factor out common fields of non-Single Variants.Eduard-Mihai Burtescu-21/+55
2019-03-29Auto merge of #58605 - nagisa:fix-the-metadata, r=michaelwoeristerbors-17/+28
Use informational target machine for metadata Since there is nothing to optimise there... Should fix #58323 but haven’t tested locally. r? @michaelwoerister
2019-03-29Use platform dependent mcount functionYuki OKUSHI-1/+29
2019-03-28Rollup merge of #58717 - hellow554:nonzero_parse, r=oli-obkMazdak Farrokhzad-1/+2
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-28fixed shift overflowMarcel Hellwig-1/+2
Fix according to oli-obk (https://github.com/rust-lang/rust/pull/58717#issuecomment-477494457)
2019-03-28Rollup merge of #57987 - parched:va-args, r=joshtriplettMazdak Farrokhzad-2/+2
Fix some AArch64 typos cc @dlrobertson
2019-03-27Give variant parts their own unique idPhilip Craig-14/+25
and bump llvm version in test
2019-03-27Use informational target machine for metadataSimonas Kazlauskas-17/+28
Since there is nothing to optimise there...
2019-03-25Auto merge of #59242 - euclio:asm-ice, r=nagisabors-2/+2
make asm diagnostic instruction optional `DiagnosticInfoInlineAsm::getInstruction` may return a null pointer, so the instruction shouldn't be blindly unwrapped. Reopening from #55193. I was unable to trigger the assertion on Windows after rebasing. Fixes #23458. Fixes #55216.
2019-03-24make asm diagnostic instruction optionalAndy Russell-2/+2
`DiagnosticInfoInlineAsm::getInstruction` may return a null pointer, so the instruction shouldn't be blindly unwrapped.
2019-03-24Rollup merge of #59377 - smaeul:patch/system-llvm, r=nikickennytm-3/+5
Correct minimum system LLVM version in tests Since commit 9452a8dfa3ba, 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-23Fix invalid DWARF for enums when using thinltoPhilip Craig-9/+14
We were setting the same identifier for both the DW_TAG_structure_type and the DW_TAG_variant_part. This becomes a problem when using thinlto becauses it uses the identifier as a key for a map of types that is used to delete duplicates based on the ODR, so one of them is deleted as a duplicate, resulting in invalid DWARF. The DW_TAG_variant_part isn't a standalone type, so it doesn't need an identifier. Fix by omitting its identifier.
2019-03-22Correct minimum system LLVM version in testsSamuel Holland-3/+5
Since commit 9452a8dfa3ba, 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-20Add a -Z time option which prints only passes which runs onceJohn Kåre Alsaker-2/+2
2019-03-19Fix AArch64 typo in commentsJames Duley-2/+2
2019-03-16Rollup merge of #59152 - smmalis37:range_contains, r=SimonSapinkennytm-1/+0
Stabilize Range*::contains. Closes https://github.com/rust-lang/rust/issues/32311. There's also a bit of rustfmt on range.rs thrown in for good measure (I forgot to turn off format-on-save in VSCode).
2019-03-15rustc: tie the 'tcx between Print and PrintCx in ty::print.Eduard-Mihai Burtescu-2/+2
2019-03-15rustc: remove fmt::{Debug,Display} from ty::TyKind.Eduard-Mihai Burtescu-12/+11
2019-03-14Auto merge of #58488 - wesleywiser:llvm_prof, r=michaelwoeristerbors-71/+52
Replace TimeLine LLVM profiling with the self profiler
2019-03-12Stabilize Range*::contains.Steven Malis-1/+0
2019-03-11Fix incorrect links in librustc_codegen_llvm documentationNikita Baksalyar-3/+3
2019-03-10Replace TimeLine with SelfProfilerWesley Wiser-71/+52
2019-03-10Make the rustc driver and interface demand drivenJohn Kåre Alsaker-2/+3
2019-03-09Auto merge of #59012 - pietroalbini:rollup, r=pietroalbinibors-2/+2
Rollup of 24 pull requests Successful merges: - #58080 (Add FreeBSD armv6 and armv7 targets) - #58204 (On return type `impl Trait` for block with no expr point at last semi) - #58269 (Add librustc and libsyntax to rust-src distribution.) - #58369 (Make the Entry API of HashMap<K, V> Sync and Send) - #58861 (Expand where negative supertrait specific error is shown) - #58877 (Suggest removal of `&` when borrowing macro and appropriate) - #58883 (Suggest appropriate code for unused field when destructuring pattern) - #58891 (Remove stray ` in the docs for the FromIterator implementation for Option) - #58893 (race condition in thread local storage example) - #58906 (Monomorphize generator field types for debuginfo) - #58911 (Regression test for #58435.) - #58912 (Regression test for #58813) - #58916 (Fix release note problems noticed after merging.) - #58918 (Regression test added for an async ICE.) - #58921 (Add an explicit test for issue #50582) - #58926 (Make the lifetime parameters of tcx consistent.) - #58931 (Elide invalid method receiver error when it contains TyErr) - #58940 (Remove JSBackend from config.toml) - #58950 (Add self to mailmap) - #58961 (On incorrect cfg literal/identifier, point at the right span) - #58963 (libstd: implement Error::source for io::Error) - #58970 (delay_span_bug in wfcheck's ty.lift_to_tcx unwrap) - #58984 (Teach `-Z treat-err-as-bug` to take a number of errors to emit) - #59007 (Add a test for invalid const arguments) Failed merges: - #58959 (Add release notes for PR #56243) r? @ghost
2019-03-08Rollup merge of #58926 - gabi-250:tcx-lifetimes, r=petrochenkovPietro Albini-2/+2
Make the lifetime parameters of tcx consistent. I have implemented `codegen_allocator` for my backend, but I've had to make a small change to its signature in `ExtraBackendMethods`. I wonder if this change is justified, or if it is too specific to my use case to be useful to anyone else. `write_metadata` and `codegen_allocator` are both called from `codegen_crate` (in `librustc_codegen_ssa/base.rs`), and they both receive the same `tcx` as an argument: https://github.com/rust-lang/rust/blob/c196097e588b05e86b5ce6de992b2a6e6a7027bd/src/librustc_codegen_ssa/base.rs#L555-L557 and: https://github.com/rust-lang/rust/blob/c196097e588b05e86b5ce6de992b2a6e6a7027bd/src/librustc_codegen_ssa/base.rs#L640-L642 However, `codegen_allocator` accepts a `TyCtxt` with any lifetime parameters (`tcx: TyCtxt<'_, '_, '_>`), while `write_metadata` requires that the `tcx` argument is of type `TyCtxt<'b, 'gcx, 'gcx>`. In my implementation, I've found that it's necessary for `tcx` in `codegen_allocator` to also have the `<'b, 'gcx, 'gcx>` lifetime parameters. Have I misunderstood the purpose of the parameters of `TyCtxt`? I've read [here](https://rust-lang.github.io/rustc-guide/ty.html) that the last two parameters only need to be distinct if the function needs to be used during type inference, but I don't think that is the case here.
2019-03-07HirIdification: replace NodeId method callsljedrz-2/+2
2019-03-05Use non_erasable_generics for codegenvarkor-1/+1
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-04Make the lifetime parameters of tcx consistent.Gabriela Alexandra Moldovan-2/+2
2019-03-01Auto merge of #58408 - alexcrichton:update-llvm, r=michaelwoeristerbors-127/+0
rustc: Update LLVM, remove dead wasm code This commit updates the LLVM branch to the rebased version of the upstream release/8.x branch. This includes a wasm patch which means that the `rewrite_imports` pass in rustc is no longer needed (yay!) and we can instead rely on `wasm-import-module`, an attribute we're already emitting, to take care of all the work.
2019-02-27Rename variadic to c_variadicDan Robertson-6/+6
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-27Support defining C compatible variadic functionsDan Robertson-22/+86
Add support for defining C compatible variadic functions in unsafe rust with extern "C".
2019-02-27rename Substs to InternalSubstscsmoe-5/+5
Change-Id: I3fa00e999a2ee4eb72db1fdf53a8633b49176a18
2019-02-26rustc: Update LLVM, remove dead wasm codeAlex Crichton-127/+0
This commit updates the LLVM branch to the rebased version of the upstream release/8.x branch. This includes a wasm patch which means that the `rewrite_imports` pass in rustc is no longer needed (yay!) and we can instead rely on `wasm-import-module`, an attribute we're already emitting, to take care of all the work.
2019-02-25librustc_codegen_llvm: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-69/+73
2019-02-24Auto merge of #58315 - gnzlbg:returns_twice, r=alexcrichtonbors-0/+4
Implement unstable ffi_return_twice attribute This PR implements [RFC2633](https://github.com/rust-lang/rfcs/pull/2633) r? @eddyb
2019-02-24Auto merge of #58691 - Centril:rollup, r=Centrilbors-1/+1
Rollup of 6 pull requests Successful merges: - #57364 (Improve parsing diagnostic for negative supertrait bounds) - #58183 (Clarify guarantees for `Box` allocation) - #58442 (Simplify the unix `Weak` functionality) - #58454 (Refactor Windows stdio and remove stdin double buffering ) - #58511 (Const to op simplification) - #58642 (rustdoc: support methods on primitives in intra-doc links) Failed merges: r? @ghost