Export ValueLocRange and DisplayFunctionAnnotations::default()

This commit is contained in:
bjorn3
2019-05-14 15:54:04 +02:00
committed by Benjamin Bouvier
parent a0ddbf403c
commit edd2bf12fd
3 changed files with 6 additions and 2 deletions

View File

@@ -228,7 +228,8 @@ pub struct DisplayFunctionAnnotations<'a> {
}
impl<'a> DisplayFunctionAnnotations<'a> {
fn default() -> Self {
/// Create a DisplayFunctionAnnotations with all fields set to None.
pub fn default() -> Self {
DisplayFunctionAnnotations {
isa: None,
value_ranges: None,

View File

@@ -57,7 +57,7 @@ use std::collections::{hash_map, HashMap, HashSet};
pub use crate::context::Context;
pub use crate::legalizer::legalize_function;
pub use crate::value_label::ValueLabelsRanges;
pub use crate::value_label::{ValueLabelsRanges, ValueLocRange};
pub use crate::verifier::verify_function;
pub use crate::write::write_function;

View File

@@ -11,8 +11,11 @@ use std::vec::Vec;
/// Value location range.
#[derive(Debug, Clone, Copy)]
pub struct ValueLocRange {
/// The ValueLoc containing a ValueLabel during this range.
pub loc: ValueLoc,
/// The start of the range.
pub start: u32,
/// The end of the range.
pub end: u32,
}