@@ -412,29 +412,6 @@ impl<'gcc, 'tcx> MiscMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
412
412
} ;
413
413
let func = self . declare_func ( name, self . type_i32 ( ) , & [ ] , true ) ;
414
414
415
- // NOTE: using a weak alias to rust_eh_personality doesn't seem to work
416
- // (perhaps because it is not exported from the object file?). So
417
- // create a weak wrapper function.
418
- /*let void_ptr_type = self.context.new_type::<*mut ()>();
419
- let param1 = self.context.new_parameter(None, self.type_i32(), "state");
420
- let param2 = self.context.new_parameter(None, void_ptr_type, "exception_object");
421
- let param3 = self.context.new_parameter(None, void_ptr_type, "context");
422
- let gcc_func = self.context.new_function(None, FunctionType::Exported, self.type_i32(), &[param1, param2, param3], "__gcc_personality_v0", false);
423
- gcc_func.add_attribute(FnAttribute::Weak);
424
- let block = gcc_func.new_block("block");
425
- block.end_with_return(None, self.context.new_call(None, func, &[param1.to_rvalue(), param2.to_rvalue(), param3.to_rvalue()]));*/
426
-
427
- // FIXME FIXME FIXME: the handling of aliases doesn't seem to work in
428
- // libgccjit.
429
- // Probably because the alias needs to be in the crate where
430
- // rust_eh_personality is defined. Here, we only create an extern for
431
- // rust_eh_personality.
432
- /*
433
- let gcc_func = self.context.new_function(None, FunctionType::Extern, self.type_i32(), &[], "__gcc_personality_v0", true);
434
- gcc_func.add_attribute(FnAttribute::Weak);
435
- gcc_func.add_attribute(FnAttribute::Alias("rust_eh_personality"));
436
- */
437
-
438
415
unsafe { std:: mem:: transmute ( func) }
439
416
}
440
417
} ;
0 commit comments