xls/data_structures/leaf_type_tree.h
// Creates the vector of leaf types.
Creates the vector of leaf types.
Creates the vector of leaf types .
void MakeLeafTypes(Type* t) {
    if (IsLeafType(t)) {
      leaf_types_.push_back(t);
      return;
    }
    if (t->IsArray()) {
      for (int64_t i = 0; i < t->AsArrayOrDie()->size(); ++i) {
        MakeLeafTypes(t->AsArrayOrDie()->element_type());
      }
      return;
    }
    XLS_CHECK(t->IsTuple());
    for (int64_t i = 0; i < t->AsTupleOrDie()->size(); ++i) {
      MakeLeafTypes(t->AsTupleOrDie()->element_type(i));
    }
  }
void MakeLeafTypes ( Type * t ) { if ( IsLeafType ( t ) ) { leaf_types_ . push_back ( t ) ; return ; } if ( t -> IsArray ( ) ) { for ( int64_t i = 0 ; i < t -> AsArrayOrDie ( ) -> size ( ) ; ++ i ) { MakeLeafTypes ( t -> AsArrayOrDie ( ) -> element_type ( ) ) ; } return ; } XLS_CHECK ( t -> IsTuple ( ) ) ; for ( int64_t i = 0 ; i < t -> AsTupleOrDie ( ) -> size ( ) ; ++ i ) { MakeLeafTypes ( t -> AsTupleOrDie ( ) -> element_type ( i ) ) ; } }
Creates the vector of leaf types.
Creates the vector of leaf types .