prism-llvm 0.1.0

A Rust abstraction layer for LLVM with a compilation pipeline.
1
2
3
4
5
6
7
8
9
use std::{fs, path::Path};

use crate::error::PrismError;

pub fn write_ir(ir_str: &str, path: impl AsRef<Path>) -> Result<(), PrismError> {
    fs::write(path, ir_str).map_err(|err| PrismError::Io(err))?;

    Ok(())
}