Move backend_id to static str

This commit is contained in:
Syrus
2020-01-13 15:40:09 +01:00
parent cb5cf00442
commit a1d8b9aa5b
6 changed files with 17 additions and 11 deletions

View File

@ -59,6 +59,8 @@ pub const INLINE_BREAKPOINT_SIZE_X86_SINGLEPASS: usize = 7;
/// Inline breakpoint size for aarch64.
pub const INLINE_BREAKPOINT_SIZE_AARCH64_SINGLEPASS: usize = 12;
static BACKEND_ID: &str = "singlepass";
#[cfg(target_arch = "x86_64")]
lazy_static! {
/// Performs a System V call to `target` with [stack_top..stack_base] as the argument list, from right to left.
@ -651,8 +653,8 @@ impl ModuleCodeGenerator<X64FunctionCode, X64ExecutionContext, CodegenError>
false
}
fn backend_id() -> String {
"singlepass".to_string()
fn backend_id() -> &'static str {
BACKEND_ID
}
fn new_with_target(_: Option<String>, _: Option<String>, _: Option<String>) -> Self {