MCPcopy Create free account
hub / github.com/IntegralPilot/rustc_codegen_jvm / infer_string_value

Function infer_string_value

src/lower1/control_flow.rs:39–62  ·  view source on GitHub ↗
(
    rvalue: &rustc_middle::mir::Rvalue<'_>,
    source_operand: &oomir::Operand,
    local_string_values: &HashMap<Local, String>,
)

Source from the content-addressed store, hash-verified

37 let Some(ptr_module) = tcx.opt_parent(metadata_module) else {
38 return false;
39 };
40 tcx.crate_name(def_id.krate) == sym::core
41 && tcx.opt_item_name(def_id) == Some(metadata)
42 && tcx.opt_item_name(metadata_module) == Some(metadata)
43 && tcx.opt_item_name(ptr_module) == Some(sym::ptr)
44}
45
46fn is_core_ptr_free_function(
47 tcx: TyCtxt<'_>,
48 def_id: rustc_span::def_id::DefId,
49 name: Symbol,
50) -> bool {
51 tcx.crate_name(def_id.krate) == sym::core
52 && tcx.opt_item_name(def_id) == Some(name)
53 && tcx
54 .opt_parent(def_id)
55 .is_some_and(|parent| tcx.opt_item_name(parent) == Some(sym::ptr))
56}
57
58fn caller_location_operand<'tcx>(
59 source_info: SourceInfo,
60 tcx: TyCtxt<'tcx>,
61 instance: Instance<'tcx>,
62 mir: &Body<'tcx>,
63 data_types: &mut HashMap<String, oomir::DataType>,
64 instructions: &mut Vec<oomir::Instruction>,
65 temp_prefix: &str,

Callers 1

convert_basic_blockFunction · 0.85

Calls 1

Tested by

no test coverage detected