MCPcopy Create free account
hub / github.com/Amanieu/regalloc3 / load_function

Function load_function

regalloc3-tool/src/main.rs:134–141  ·  view source on GitHub ↗
(path: &Path, reginfo: &GenericRegInfo)

Source from the content-addressed store, hash-verified

132}
133
134fn load_function(path: &Path, reginfo: &GenericRegInfo) -> Result<GenericFunction> {
135 let function = fs::read(path).context("could not read function input file")?;
136 let function = String::from_utf8(function).context("function input is not UTF-8")?;
137 let function =
138 GenericFunction::parse(&function).context("could not parse function input file")?;
139 debug_utils::validate_function(&function, reginfo).context("function validation failed")?;
140 Ok(function)
141}
142
143fn main() -> Result<()> {
144 pretty_env_logger::init();

Callers 1

mainFunction · 0.85

Calls 1

validate_functionFunction · 0.85

Tested by

no test coverage detected