Add note about needing to call func.dfg.collect_debug_info for set_val_label to have any effect

This commit is contained in:
bjorn3
2019-05-14 19:25:53 +02:00
committed by Benjamin Bouvier
parent edd2bf12fd
commit c27b0a0c3e

View File

@@ -334,6 +334,8 @@ impl<'a> FunctionBuilder<'a> {
}
/// Set label for Value
///
/// This will not do anything unless `func.dfg.collect_debug_info` is called first.
pub fn set_val_label(&mut self, val: Value, label: ValueLabel) {
if let Some(values_labels) = self.func.dfg.values_labels.as_mut() {
use std::collections::hash_map::Entry;