Skip to main content

rustc_codegen_llvm/
value.rs

1use std::fmt;
2
3use crate::llvm::{self, Value};
4
5impl<'ll> fmt::Debug for Value<'ll> {
6    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7        f.write_str(
8            &llvm::build_string(|s| unsafe {
9                llvm::LLVMRustWriteValueToString(*self, s);
10            })
11            .expect("non-UTF8 value description from LLVM"),
12        )
13    }
14}