1143: Set backend_id to static str r=MarkMcCaskey a=syrusakbary

<!-- 
Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test:
https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests

-->

# Description

As per feedback in #1099, set backend_id to static str.

<!-- 
Provide details regarding the change including motivation,
links to related issues, and the context of the PR.
-->

# Review

- [ ] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Syrus <me@syrusakbary.com>
Co-authored-by: Mark McCaskey <mark@wasmer.io>
This commit is contained in:
bors[bot]
2020-01-15 18:32:01 +00:00
committed by GitHub
8 changed files with 24 additions and 18 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> {