@@ -90,7 +90,7 @@ fn get_simple_intrinsic<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, name: Symbol) ->
9090}
9191
9292impl < ' a , ' gcc , ' tcx > IntrinsicCallMethods < ' tcx > for Builder < ' a , ' gcc , ' tcx > {
93- fn codegen_intrinsic_call ( & mut self , instance : Instance < ' tcx > , fn_abi : & FnAbi < ' tcx , Ty < ' tcx > > , args : & [ OperandRef < ' tcx , RValue < ' gcc > > ] , llresult : RValue < ' gcc > , span : Span ) {
93+ fn codegen_intrinsic_call ( & mut self , instance : Instance < ' tcx > , fn_abi : & FnAbi < ' tcx , Ty < ' tcx > > , args : & [ OperandRef < ' tcx , RValue < ' gcc > > ] , llresult : RValue < ' gcc > , span : Span ) -> Result < ( ) , Instance < ' tcx > > {
9494 let tcx = self . tcx ;
9595 let callee_ty = instance. ty ( tcx, ty:: ParamEnv :: reveal_all ( ) ) ;
9696
@@ -137,7 +137,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
137137 args[ 2 ] . immediate ( ) ,
138138 llresult,
139139 ) ;
140- return ;
140+ return Ok ( ( ) ) ;
141141 }
142142 sym:: breakpoint => {
143143 unimplemented ! ( ) ;
@@ -166,12 +166,12 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
166166 sym:: volatile_store => {
167167 let dst = args[ 0 ] . deref ( self . cx ( ) ) ;
168168 args[ 1 ] . val . volatile_store ( self , dst) ;
169- return ;
169+ return Ok ( ( ) ) ;
170170 }
171171 sym:: unaligned_volatile_store => {
172172 let dst = args[ 0 ] . deref ( self . cx ( ) ) ;
173173 args[ 1 ] . val . unaligned_volatile_store ( self , dst) ;
174- return ;
174+ return Ok ( ( ) ) ;
175175 }
176176 sym:: prefetch_read_data
177177 | sym:: prefetch_write_data
@@ -269,7 +269,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
269269 } ,
270270 None => {
271271 tcx. dcx ( ) . emit_err ( InvalidMonomorphization :: BasicIntegerType { span, name, ty } ) ;
272- return ;
272+ return Ok ( ( ) ) ;
273273 }
274274 }
275275 }
@@ -339,7 +339,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
339339 extended_asm. set_volatile_flag ( true ) ;
340340
341341 // We have copied the value to `result` already.
342- return ;
342+ return Ok ( ( ) ) ;
343343 }
344344
345345 sym:: ptr_mask => {
@@ -357,11 +357,12 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
357357 _ if name_str. starts_with ( "simd_" ) => {
358358 match generic_simd_intrinsic ( self , name, callee_ty, args, ret_ty, llret_ty, span) {
359359 Ok ( llval) => llval,
360- Err ( ( ) ) => return ,
360+ Err ( ( ) ) => return Ok ( ( ) ) ,
361361 }
362362 }
363363
364- _ => bug ! ( "unknown intrinsic '{}'" , name) ,
364+ // Fall back to default body
365+ _ => return Err ( Instance :: new ( instance. def_id ( ) , instance. args ) ) ,
365366 } ;
366367
367368 if !fn_abi. ret . is_ignore ( ) {
@@ -376,6 +377,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
376377 . store ( self , result) ;
377378 }
378379 }
380+ Ok ( ( ) )
379381 }
380382
381383 fn abort ( & mut self ) {
0 commit comments