mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Reorder unwinding related builder methods to differentiate between dwarf and msvc instructions
This commit is contained in:
parent
ef119d704d
commit
19dd2ecc2d
@ -1256,6 +1256,10 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
|
||||
aggregate_value
|
||||
}
|
||||
|
||||
fn set_personality_fn(&mut self, _personality: RValue<'gcc>) {
|
||||
// TODO(antoyo)
|
||||
}
|
||||
|
||||
fn landing_pad(&mut self, _ty: Type<'gcc>, _pers_fn: RValue<'gcc>, _num_clauses: usize) -> RValue<'gcc> {
|
||||
let field1 = self.context.new_field(None, self.u8_type, "landing_pad_field_1");
|
||||
let field2 = self.context.new_field(None, self.i32_type, "landing_pad_field_1");
|
||||
@ -1295,10 +1299,6 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
fn set_personality_fn(&mut self, _personality: RValue<'gcc>) {
|
||||
// TODO(antoyo)
|
||||
}
|
||||
|
||||
// Atomic Operations
|
||||
fn atomic_cmpxchg(&mut self, dst: RValue<'gcc>, cmp: RValue<'gcc>, src: RValue<'gcc>, order: AtomicOrdering, failure_order: AtomicOrdering, weak: bool) -> RValue<'gcc> {
|
||||
let expected = self.current_func().new_local(None, cmp.get_type(), "expected");
|
||||
|
@ -956,6 +956,12 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
||||
unsafe { llvm::LLVMBuildInsertValue(self.llbuilder, agg_val, elt, idx as c_uint, UNNAMED) }
|
||||
}
|
||||
|
||||
fn set_personality_fn(&mut self, personality: &'ll Value) {
|
||||
unsafe {
|
||||
llvm::LLVMSetPersonalityFn(self.llfn(), personality);
|
||||
}
|
||||
}
|
||||
|
||||
fn landing_pad(
|
||||
&mut self,
|
||||
ty: &'ll Type,
|
||||
@ -1044,12 +1050,6 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
||||
}
|
||||
}
|
||||
|
||||
fn set_personality_fn(&mut self, personality: &'ll Value) {
|
||||
unsafe {
|
||||
llvm::LLVMSetPersonalityFn(self.llfn(), personality);
|
||||
}
|
||||
}
|
||||
|
||||
// Atomic Operations
|
||||
fn atomic_cmpxchg(
|
||||
&mut self,
|
||||
|
@ -421,6 +421,9 @@ pub trait BuilderMethods<'a, 'tcx>:
|
||||
fn extract_value(&mut self, agg_val: Self::Value, idx: u64) -> Self::Value;
|
||||
fn insert_value(&mut self, agg_val: Self::Value, elt: Self::Value, idx: u64) -> Self::Value;
|
||||
|
||||
fn set_personality_fn(&mut self, personality: Self::Value);
|
||||
|
||||
// These are used by everyone except msvc
|
||||
fn landing_pad(
|
||||
&mut self,
|
||||
ty: Self::Type,
|
||||
@ -429,6 +432,8 @@ pub trait BuilderMethods<'a, 'tcx>:
|
||||
) -> Self::Value;
|
||||
fn set_cleanup(&mut self, landing_pad: Self::Value);
|
||||
fn resume(&mut self, exn: Self::Value) -> Self::Value;
|
||||
|
||||
// These are used only by msvc
|
||||
fn cleanup_pad(&mut self, parent: Option<Self::Value>, args: &[Self::Value]) -> Self::Funclet;
|
||||
fn cleanup_ret(
|
||||
&mut self,
|
||||
@ -443,7 +448,6 @@ pub trait BuilderMethods<'a, 'tcx>:
|
||||
num_handlers: usize,
|
||||
) -> Self::Value;
|
||||
fn add_handler(&mut self, catch_switch: Self::Value, handler: Self::BasicBlock);
|
||||
fn set_personality_fn(&mut self, personality: Self::Value);
|
||||
|
||||
fn atomic_cmpxchg(
|
||||
&mut self,
|
||||
|
Loading…
Reference in New Issue
Block a user