Reduced line length to pass tidy

Generalized FunctionCx

Added ValueTrait and first change

Generalize CondegenCx

Generalized the Builder struct defined in librustc_codegen_llvm/builder.rs
This commit is contained in:
Denis Merigoux
2018-08-03 14:20:10 +02:00
committed by Eduard-Mihai Burtescu
parent c76fc3d804
commit 83b2152ce4
12 changed files with 44 additions and 38 deletions

View File

@@ -26,12 +26,12 @@ use std::ptr;
// All Builders must have an llfn associated with them
#[must_use]
pub struct Builder<'a, 'll: 'a, 'tcx: 'll> {
pub struct Builder<'a, 'll: 'a, 'tcx: 'll, V: 'll = &'ll Value> {
pub llbuilder: &'ll mut llvm::Builder<'ll>,
pub cx: &'a CodegenCx<'ll, 'tcx>,
pub cx: &'a CodegenCx<'ll, 'tcx, V>,
}
impl Drop for Builder<'a, 'll, 'tcx> {
impl<V> Drop for Builder<'_, '_, '_, V> {
fn drop(&mut self) {
unsafe {
llvm::LLVMDisposeBuilder(&mut *(self.llbuilder as *mut _));