replace some deprecated functions
This commit is contained in:
parent
a5cf8bbd4e
commit
b7c5656713
14 changed files with 61 additions and 87 deletions
|
@ -21,6 +21,7 @@ use crate::{CodegenResults, ModuleCodegen};
|
|||
|
||||
pub trait BackendTypes {
|
||||
type Value: CodegenObject;
|
||||
type Metadata: CodegenObject;
|
||||
type Function: CodegenObject;
|
||||
|
||||
type BasicBlock: Copy;
|
||||
|
|
|
@ -51,6 +51,7 @@ pub trait BuilderMethods<'a, 'tcx>:
|
|||
type CodegenCx: CodegenMethods<
|
||||
'tcx,
|
||||
Value = Self::Value,
|
||||
Metadata = Self::Metadata,
|
||||
Function = Self::Function,
|
||||
BasicBlock = Self::BasicBlock,
|
||||
Type = Self::Type,
|
||||
|
|
|
@ -24,14 +24,14 @@ pub trait IntrinsicCallBuilderMethods<'tcx>: BackendTypes {
|
|||
fn assume(&mut self, val: Self::Value);
|
||||
fn expect(&mut self, cond: Self::Value, expected: bool) -> Self::Value;
|
||||
/// Trait method used to test whether a given pointer is associated with a type identifier.
|
||||
fn type_test(&mut self, pointer: Self::Value, typeid: Self::Value) -> Self::Value;
|
||||
fn type_test(&mut self, pointer: Self::Value, typeid: Self::Metadata) -> Self::Value;
|
||||
/// Trait method used to load a function while testing if it is associated with a type
|
||||
/// identifier.
|
||||
fn type_checked_load(
|
||||
&mut self,
|
||||
llvtable: Self::Value,
|
||||
vtable_byte_offset: u64,
|
||||
typeid: Self::Value,
|
||||
typeid: Self::Metadata,
|
||||
) -> Self::Value;
|
||||
/// Trait method used to inject `va_start` on the "spoofed" `VaListImpl` in
|
||||
/// Rust defined C-variadic functions.
|
||||
|
|
|
@ -152,7 +152,7 @@ pub trait LayoutTypeCodegenMethods<'tcx>: BackendTypes {
|
|||
pub trait TypeMembershipCodegenMethods<'tcx>: BackendTypes {
|
||||
fn add_type_metadata(&self, _function: Self::Function, _typeid: String) {}
|
||||
fn set_type_metadata(&self, _function: Self::Function, _typeid: String) {}
|
||||
fn typeid_metadata(&self, _typeid: String) -> Option<Self::Value> {
|
||||
fn typeid_metadata(&self, _typeid: String) -> Option<Self::Metadata> {
|
||||
None
|
||||
}
|
||||
fn add_kcfi_type_metadata(&self, _function: Self::Function, _typeid: u32) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue