refactor: centralize box type metadata
This commit is contained in:
committed by
Selfhosting Dev
parent
f124731764
commit
c4e1728b8e
27
src/backend/llvm/compiler/mod.rs
Normal file
27
src/backend/llvm/compiler/mod.rs
Normal file
@ -0,0 +1,27 @@
|
||||
use crate::box_trait::NyashBox;
|
||||
use crate::mir::ValueId;
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub struct LLVMCompiler {
|
||||
values: HashMap<ValueId, Box<dyn NyashBox>>,
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "llvm"))]
|
||||
mod mock;
|
||||
#[cfg(not(feature = "llvm"))]
|
||||
pub use mock::*;
|
||||
|
||||
#[cfg(feature = "llvm")]
|
||||
mod real;
|
||||
#[cfg(feature = "llvm")]
|
||||
pub use real::*;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_llvm_module_creation() {
|
||||
assert!(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user