MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / from_session

Method from_session

crates/rustc_codegen_spirv/src/codegen_cx/mod.rs:263–268  ·  view source on GitHub ↗
(sess: &Session)

Source from the content-addressed store, hash-verified

261
262impl CodegenArgs {
263 pub fn from_session(sess: &Session) -> Self {
264 match CodegenArgs::parse(&sess.opts.cg.llvm_args) {
265 Ok(ok) => ok,
266 Err(err) => sess.fatal(format!("Unable to parse llvm-args: {err}")),
267 }
268 }
269
270 // FIXME(eddyb) `structopt` would come a long way to making this nicer.
271 pub fn parse(args: &[String]) -> Result<Self, rustc_session::getopts::Fail> {

Callers

nothing calls this directly

Calls 1

fatalMethod · 0.80

Tested by

no test coverage detected