MCPcopy Create free account
hub / github.com/Rust-API/Rust-API-Bypass-Checker / visit_literal

Method visit_literal

src/analysis/mir_visitor/block_visitor.rs:2140–2152  ·  view source on GitHub ↗
(&mut self, literal: &mir::Const<'tcx>)

Source from the content-addressed store, hash-verified

2138 }
2139
2140 pub fn visit_literal(&mut self, literal: &mir::Const<'tcx>) -> Rc<SymbolicValue> {
2141 info!("visit_literal {:?}", literal);
2142 match literal {
2143 // This constant came from the type system
2144 mir::Const::Ty(_ty, c) => self.visit_constant(c),
2145 // An unevaluated mir constant which is not part of the type system.
2146 // mir::Const::Unevaluated(c, ty) => self.visit_unevaluated_const(c, *ty),
2147 // // This constant contains something the type system cannot handle (e.g. pointers).
2148 mir::Const::Val(v, ty) => self.visit_const_value(*v, *ty),
2149 // mir::Const::Val(v, ty) => self.
2150 _ => symbolic_value::BOTTOM.into(),
2151 }
2152 }
2153
2154 fn visit_const_value(&mut self, val: ConstValue<'tcx>, lty: Ty<'tcx>) -> Rc<SymbolicValue> {
2155 match val {

Callers 2

visit_operandMethod · 0.80
visit_useMethod · 0.80

Calls 2

visit_constantMethod · 0.80
visit_const_valueMethod · 0.80

Tested by

no test coverage detected