about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/mir/block.rs
AgeCommit message (Collapse)AuthorLines
2019-04-04Rollup merge of #59639 - cuviper:ignore-uninhabited, r=eddybMazdak Farrokhzad-0/+7
Never return uninhabited values at all Functions with uninhabited return values are already marked `noreturn`, but we were still generating return instructions for this. When running with `-C passes=lint`, LLVM prints: Unusual: Return statement in function with noreturn attribute The LLVM manual makes a stronger statement about `noreturn` though: > This produces undefined behavior at runtime if the function ever does dynamically return. We now emit an `abort` anywhere that would have tried to return an uninhabited value. Fixes #48227 cc #7463 #48229 r? @eddyb
2019-04-03Never return uninhabited values at allJosh Stone-0/+7
Functions with uninhabited return values are already marked `noreturn`, but we were still generating return instructions for this. When running with `-C passes=lint`, LLVM prints: Unusual: Return statement in function with noreturn attribute The LLVM manual makes a stronger statement about `noreturn` though: > This produces undefined behavior at runtime if the function ever does dynamically return. We now emit an `abort` anywhere that would have tried to return an uninhabited value.
2019-04-03Rollup merge of #59514 - tmandry:remove-adt-def-from-projection-elem, r=eddybMazdak Farrokhzad-1/+1
Remove adt_def from projections and downcasts in MIR As part of optimizing generator layouts in MIR, we'd like to allow downcasting generators to variants which do not have a corresponding `def_id`, since they are created by the compiler. This refactor hopes to allow that, without regressing perf. r? @eddyb
2019-04-02Remove adt_def from PlaceTy and make it a structTyler Mandry-1/+1
2019-04-02renames EvalErrorKind to InterpErrorkenta7777-3/+3
2019-03-31Fix LLVM IR generated for C-variadic argumentsDan Robertson-13/+2
It is possible to create malformed LLVM IR given variadic arguments that are aggregate types. This occurs due to improper tracking of the current argument in the functions list of arguments.
2019-03-29Use ExactSizeIterator + TrustedLen instead of num_cases arg for switchbjorn3-1/+0
2019-03-29Add a method for emiting a switch.bjorn3-10/+7
2019-03-29Remove const_{cstr,str_slice,get_elt,get_real} and is_const_real methods ↵bjorn3-33/+20
from cg_ssa This introduces the static_panic_msg trait method to StaticBuilderMethods.
2019-03-29`eval_mir_constant` doesn't need a builder parambjorn3-1/+1
2019-03-23adding mir::StaticKind enum for static and promotedSaleem Jaffer-7/+11
2019-03-21review fixesSaleem Jaffer-4/+4
2019-03-18fixed all compilation errorsSaleem Jaffer-4/+8
2019-03-07Fix segfaults in release build C-variadic fnsDan Robertson-2/+7
`va_start` and `va_end` must be called to initialize/cleanup the "spoofed" `VaList` in a Rust defined C-variadic function even if the `VaList` is not used.
2019-03-01Put Local, Static and Promoted as one Base variant of PlaceSantiago Pastorino-5/+9
2019-02-27Rename variadic to c_variadicDan Robertson-3/+3
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-27Refactor FunctionCx::codgen_terminatorDan Robertson-671/+771
- Move closures defined in codegen_terminator into a separate helper structure and implementation. - Create helper functions for each of the complex match arms on the terminators kind in codegen_terminator.
2019-02-27Support defining C compatible variadic functionsDan Robertson-4/+46
Add support for defining C compatible variadic functions in unsafe rust with extern "C".
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-1/+1
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-10rustc: doc commentsAlexander Regueiro-1/+1
2019-02-09librustc_codegen_ssa => 2018Taiki Endo-5/+5
2018-12-27use a better way to get at the type parameterRalf Jung-6/+1
2018-12-27panic when calling MaybeUninhabited::into_inner on uninhabited typeRalf Jung-46/+55
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-29Use implicit deref instead of BuilderMethods::cx()bjorn3-52/+52
2018-11-29Don't use llvm intrinsic names in cg_ssabjorn3-5/+2
2018-11-22rustc_target: avoid using AbiAndPrefAlign where possible.Eduard-Mihai Burtescu-13/+13
2018-11-22rustc_target: separate out an individual Align from AbiAndPrefAlign.Eduard-Mihai Burtescu-3/+3
2018-11-16[eddyb] rustc_codegen_ssa: rename `interfaces` to `traits`.Eduard-Mihai Burtescu-1/+1
2018-11-16All Builder methods now take &mut self instead of &selfDenis Merigoux-52/+57
2018-11-16Added some docs + start to &mut self builder methodsDenis Merigoux-14/+14
2018-11-16Great separation of librustc_codegen_llvm: librustc_codegen_ssa compilesDenis Merigoux-0/+1110