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

@ -45,6 +45,8 @@ use wasmer_runtime_core::{
};
use wasmparser::{BinaryReaderError, MemoryImmediate, Operator, Type as WpType};
static BACKEND_ID: &str = "llvm";
fn func_sig_to_llvm<'ctx>(
context: &'ctx Context,
intrinsics: &Intrinsics<'ctx>,
@ -8721,8 +8723,8 @@ impl<'ctx> ModuleCodeGenerator<LLVMFunctionCodeGenerator<'ctx>, LLVMBackend, Cod
}
}
fn backend_id() -> String {
"llvm".to_string()
fn backend_id() -> &'static str {
BACKEND_ID
}
fn check_precondition(&mut self, _module_info: &ModuleInfo) -> Result<(), CodegenError> {