@@ -101,54 +101,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
101
101
}
102
102
}
103
103
104
- pub ( crate ) fn codegen_stmt_debuginfo ( & mut self , bx : & mut Bx , debuginfo : & StmtDebugInfo < ' tcx > ) {
105
- match debuginfo {
106
- StmtDebugInfo :: AssignRef ( dest, place) => {
107
- let place_ref = match self . locals [ place. local ] {
108
- LocalRef :: Place ( place_ref) | LocalRef :: UnsizedPlace ( place_ref) => {
109
- Some ( place_ref)
110
- }
111
- LocalRef :: Operand ( operand_ref) => match operand_ref. val {
112
- OperandValue :: Ref ( _place_value) => {
113
- todo ! ( "supports OperandValue::Ref" )
114
- }
115
- OperandValue :: Immediate ( v) => {
116
- // FIXME: add ref to layout?
117
- Some ( PlaceRef :: new_sized ( v, operand_ref. layout ) )
118
- }
119
- OperandValue :: Pair ( _, _) => None ,
120
- OperandValue :: ZeroSized => None ,
121
- } ,
122
- LocalRef :: PendingOperand => None ,
123
- }
124
- . filter ( |place_ref| {
125
- // Drop unsupported projections.
126
- // FIXME: Add a test case.
127
- place. projection . iter ( ) . all ( |p| p. can_use_in_debuginfo ( ) ) &&
128
- // Only pointers can calculate addresses.
129
- bx. type_kind ( bx. val_ty ( place_ref. val . llval ) ) == TypeKind :: Pointer
130
- } ) ;
131
- let ( val, layout, projection) =
132
- match ( place_ref, place. is_indirect_first_projection ( ) ) {
133
- ( Some ( place_ref) , false ) => {
134
- ( place_ref. val , place_ref. layout , place. projection . as_slice ( ) )
135
- }
136
- ( Some ( place_ref) , true ) => {
137
- let projected_ty =
138
- place_ref. layout . ty . builtin_deref ( true ) . unwrap_or_else ( || {
139
- bug ! ( "deref of non-pointer {:?}" , place_ref)
140
- } ) ;
141
- let layout = bx. cx ( ) . layout_of ( projected_ty) ;
142
- ( place_ref. val , layout, & place. projection [ 1 ..] )
143
- }
144
- _ => {
145
- return ;
146
- }
147
- } ;
148
- self . debug_new_value_to_local ( bx, * dest, val, layout, projection) ;
149
- }
150
- }
151
- }
104
+ pub ( crate ) fn codegen_stmt_debuginfo ( & mut self , _bx : & mut Bx , _debuginfo : & StmtDebugInfo < ' tcx > ) { }
105
+
152
106
pub ( crate ) fn codegen_stmt_debuginfos (
153
107
& mut self ,
154
108
bx : & mut Bx ,
0 commit comments