@@ -854,7 +854,9 @@ pub fn create_global_var_metadata(cx: &CrateContext,
854854/// local in `bcx.fcx.lllocals`.
855855/// Adds the created metadata nodes directly to the crate's IR.
856856pub fn create_local_var_metadata ( bcx : Block , local : & ast:: Local ) {
857- if bcx. unreachable . get ( ) || fn_should_be_ignored ( bcx. fcx ) {
857+ if bcx. unreachable . get ( ) ||
858+ fn_should_be_ignored ( bcx. fcx ) ||
859+ bcx. sess ( ) . opts . debuginfo != FullDebugInfo {
858860 return ;
859861 }
860862
@@ -898,7 +900,9 @@ pub fn create_captured_var_metadata<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
898900 env_index : uint ,
899901 captured_by_ref : bool ,
900902 span : Span ) {
901- if bcx. unreachable . get ( ) || fn_should_be_ignored ( bcx. fcx ) {
903+ if bcx. unreachable . get ( ) ||
904+ fn_should_be_ignored ( bcx. fcx ) ||
905+ bcx. sess ( ) . opts . debuginfo != FullDebugInfo {
902906 return ;
903907 }
904908
@@ -981,7 +985,9 @@ pub fn create_captured_var_metadata<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
981985pub fn create_match_binding_metadata < ' blk , ' tcx > ( bcx : Block < ' blk , ' tcx > ,
982986 variable_ident : ast:: Ident ,
983987 binding : BindingInfo < ' tcx > ) {
984- if bcx. unreachable . get ( ) || fn_should_be_ignored ( bcx. fcx ) {
988+ if bcx. unreachable . get ( ) ||
989+ fn_should_be_ignored ( bcx. fcx ) ||
990+ bcx. sess ( ) . opts . debuginfo != FullDebugInfo {
985991 return ;
986992 }
987993
@@ -1021,7 +1027,9 @@ pub fn create_match_binding_metadata<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
10211027/// argument in `bcx.fcx.lllocals`.
10221028/// Adds the created metadata nodes directly to the crate's IR.
10231029pub fn create_argument_metadata ( bcx : Block , arg : & ast:: Arg ) {
1024- if bcx. unreachable . get ( ) || fn_should_be_ignored ( bcx. fcx ) {
1030+ if bcx. unreachable . get ( ) ||
1031+ fn_should_be_ignored ( bcx. fcx ) ||
1032+ bcx. sess ( ) . opts . debuginfo != FullDebugInfo {
10251033 return ;
10261034 }
10271035
@@ -1075,7 +1083,9 @@ pub fn create_argument_metadata(bcx: Block, arg: &ast::Arg) {
10751083/// loop variable in `bcx.fcx.lllocals`.
10761084/// Adds the created metadata nodes directly to the crate's IR.
10771085pub fn create_for_loop_var_metadata ( bcx : Block , pat : & ast:: Pat ) {
1078- if bcx. unreachable . get ( ) || fn_should_be_ignored ( bcx. fcx ) {
1086+ if bcx. unreachable . get ( ) ||
1087+ fn_should_be_ignored ( bcx. fcx ) ||
1088+ bcx. sess ( ) . opts . debuginfo != FullDebugInfo {
10791089 return ;
10801090 }
10811091
0 commit comments