pub fn create_argument_metadata(bcx: Block, arg: &hir::Arg) {
    if bcx.unreachable.get() ||
       fn_should_be_ignored(bcx.fcx) ||
       bcx.sess().opts.debuginfo != FullDebugInfo {
        return;
    }

    let scope_metadata = bcx
                         .fcx
                         .debug_context
                         .get_ref(arg.pat.span)
                         .fn_metadata;
    let locals = bcx.fcx.lllocals.borrow();

    pat_util::pat_bindings(&arg.pat, |_, node_id, span, var_name| {
        let datum = match locals.get(&node_id) {
            Some(v) => v,
            None => {
                span_bug!(span, "no entry in lllocals table for {}", node_id);
            }
        };

        if unsafe { llvm::LLVMIsAAllocaInst(datum.val) } == ptr::null_mut() {
            span_bug!(span, "debuginfo::create_argument_metadata() - \
                             Referenced variable location is not an alloca!");
        }

        let argument_index = {
            let counter = &bcx
                          .fcx
                          .debug_context
                          .get_ref(span)
                          .argument_counter;
            let argument_index = counter.get();
            counter.set(argument_index + 1);
            argument_index
        };

        declare_local(bcx,
                      var_name.node,
                      datum.ty,
                      scope_metadata,
                      VariableAccess::DirectVariable { alloca: datum.val },
                      VariableKind::ArgumentVariable(argument_index),
                      span);
    })
}
/// Creates debug information for the given function argument.
///
/// This function assumes that there's a datum for each pattern component of the
/// argument in `bcx.fcx.lllocals`.
/// Adds the created metadata nodes directly to the crate's IR.
Creates debug information for the given function argument.
This function assumes that there's a datum for each pattern component of the
argument in `bcx.fcx.lllocals`.
Adds the created metadata nodes directly to the crate's IR.
Creates debug information for the given function argument . This function assumes that there ' s a datum for each pattern component of the argument in ` bcx . fcx . lllocals ` . Adds the created metadata nodes directly to the crate ' s IR .
pub fn create_argument_metadata(bcx: Block, arg: &hir::Arg) {
    if bcx.unreachable.get() ||
       fn_should_be_ignored(bcx.fcx) ||
       bcx.sess().opts.debuginfo != FullDebugInfo {
        return;
    }
    let scope_metadata = bcx
                         .fcx
                         .debug_context
                         .get_ref(arg.pat.span)
                         .fn_metadata;
    let locals = bcx.fcx.lllocals.borrow();
    pat_util::pat_bindings(&arg.pat, |_, node_id, span, var_name| {
        let datum = match locals.get(&node_id) {
            Some(v) => v,
            None => {
                span_bug!(span, "no entry in lllocals table for {}", node_id);
            }
        };
        if unsafe { llvm::LLVMIsAAllocaInst(datum.val) } == ptr::null_mut() {
            span_bug!(span, "debuginfo::create_argument_metadata() - \
                             Referenced variable location is not an alloca!");
        }
        let argument_index = {
            let counter = &bcx
                          .fcx
                          .debug_context
                          .get_ref(span)
                          .argument_counter;
            let argument_index = counter.get();
            counter.set(argument_index + 1);
            argument_index
        };
        declare_local(bcx,
                      var_name.node,
                      datum.ty,
                      scope_metadata,
                      VariableAccess::DirectVariable { alloca: datum.val },
                      VariableKind::ArgumentVariable(argument_index),
                      span);
    })
}
pub fn create_argument_metadata ( bcx : Block , arg : & hir :: Arg ) { if bcx . unreachable . get ( ) || fn_should_be_ignored ( bcx . fcx ) || bcx . sess ( ) . opts . debuginfo != FullDebugInfo { return ; } let scope_metadata = bcx . fcx . debug_context . get_ref ( arg . pat . span ) . fn_metadata ; let locals = bcx . fcx . lllocals . borrow ( ) ; pat_util :: pat_bindings ( & arg . pat , | _ , node_id , span , var_name | { let datum = match locals . get ( & node_id ) { Some ( v ) => v , None => { span_bug ! ( span " " node_id ) ; } } ; if unsafe { llvm :: LLVMIsAAllocaInst ( datum . val ) } == ptr :: null_mut ( ) { span_bug ! ( span " \
 " ) ; } let argument_index = { let counter = & bcx . fcx . debug_context . get_ref ( span ) . argument_counter ; let argument_index = counter . get ( ) ; counter . set ( argument_index + 1 ) ; argument_index } ; declare_local ( bcx , var_name . node , datum . ty , scope_metadata , VariableAccess :: DirectVariable { alloca : datum . val } , VariableKind :: ArgumentVariable ( argument_index ) , span ) ; } ) }
Creates debug information for the given function argument.
Creates debug information for the given function argument .
bcx
Block
arg
&hir::Arg
bcx
Block
arg
&hir::Arg