Changes in / [64b6913:26ba208]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/TupleExpansion.cc

    r64b6913 r26ba208  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar 15 07:58:00 2017
    13 // Update Count     : 14
     12// Last Modified On : Thu Mar 16 08:05:17 2017
     13// Update Count     : 15
    1414//
    1515
     
    187187                        }
    188188                        BasicType * boolType = new BasicType( Type::Qualifiers(), BasicType::Bool );
    189                         ObjectDecl * finished = new ObjectDecl( toString( "_unq_expr_finished_", id ), DeclarationNode::StorageClasses(), LinkageSpec::Cforall, nullptr, new BasicType( Type::Qualifiers(), BasicType::Bool ), new SingleInit( new ConstantExpr( Constant( boolType->clone(), "0" ) ), noDesignators ) );
     189                        ObjectDecl * finished = new ObjectDecl( toString( "_unq_expr_finished_", id ), Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new BasicType( Type::Qualifiers(), BasicType::Bool ), new SingleInit( new ConstantExpr( Constant( boolType->clone(), "0" ) ), noDesignators ) );
    190190                        addDeclaration( finished );
    191191                        // (finished ? _unq_expr_N : (_unq_expr_N = <unqExpr->get_expr()>, finished = 1, _unq_expr_N))
     
    221221                        decl->set_body( true );
    222222                        for ( size_t i = 0; i < tupleSize; ++i ) {
    223                                 TypeDecl * tyParam = new TypeDecl( toString( "tuple_param_", i ), DeclarationNode::StorageClasses(), nullptr, TypeDecl::Any );
    224                                 decl->get_members().push_back( new ObjectDecl( toString("field_", i ), DeclarationNode::StorageClasses(), LinkageSpec::C, nullptr, new TypeInstType( Type::Qualifiers(), tyParam->get_name(), tyParam ), nullptr ) );
     223                                TypeDecl * tyParam = new TypeDecl( toString( "tuple_param_", i ), Type::StorageClasses(), nullptr, TypeDecl::Any );
     224                                decl->get_members().push_back( new ObjectDecl( toString("field_", i ), Type::StorageClasses(), LinkageSpec::C, nullptr, new TypeInstType( Type::Qualifiers(), tyParam->get_name(), tyParam ), nullptr ) );
    225225                                decl->get_parameters().push_back( tyParam );
    226226                        }
    227227                        if ( tupleSize == 0 ) {
    228228                                // empty structs are not standard C. Add a dummy field to empty tuples to silence warnings when a compound literal Tuple0 is created.
    229                                 decl->get_members().push_back( new ObjectDecl( "dummy", DeclarationNode::StorageClasses(), LinkageSpec::C, nullptr, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr ) );
     229                                decl->get_members().push_back( new ObjectDecl( "dummy", Type::StorageClasses(), LinkageSpec::C, nullptr, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr ) );
    230230                        }
    231231                        typeMap[tupleSize] = decl;
Note: See TracChangeset for help on using the changeset viewer.